Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for common radial gradient fills. #152

Merged
merged 2 commits into from
Sep 9, 2019
Merged

Conversation

simeoncran
Copy link
Contributor

No description provided.

public Vector2? EllipseCenter { get; set; }

// Default is 0.5, 0.5
public Vector2? EllipseRadius { get; set; }
Copy link
Contributor

@eliezerpMS eliezerpMS Sep 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EllipseRadius [](start = 24, length = 13)

Just curious but MSDN says the default is (1,1)? #ByDesign

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSDN says GradientOriginOffset default is (0.5, 0.5)


In reply to: 321944773 [](ancestors = 321944773)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSDN is not consistent with reality. I created a pair of PRs to fix this in the docs. E.g. MicrosoftDocs/winrt-api#1217


In reply to: 321944893 [](ancestors = 321944893,321944773)

case ShapeContentType.LinearGradientStroke:
case ShapeContentType.RadialGradientStroke:
_owner._issues.GradientStrokeIsNotSupported();
break;

case ShapeContentType.RadialGradientFill:
case ShapeContentType.LinearGradientFill:
case ShapeContentType.SolidColorFill:
Copy link
Contributor

@eliezerpMS eliezerpMS Sep 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nit: I would not mind this to be alphabetized #Closed

var result = _c.CreateRadialGradientBrush();

// BodyMovin specifies start and end points in absolute values.
result.MappingMode = CompositionMappingMode.Absolute;
Copy link
Contributor

@eliezerpMS eliezerpMS Sep 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to encode this in the CompositionRadialGradientBrush to keep the translator agnostic of what the parser actually had to parse? #ByDesign

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed in person.


In reply to: 321945409 [](ancestors = 321945409)

@@ -2662,6 +2646,113 @@ CompositionLinearGradientBrush TranslateLinearGradientFill(TranslationContext co
return result;
}

CompositionRadialGradientBrush TranslateRadialGradientFill(TranslationContext context, RadialGradientFill shapeFill, TrimmedAnimatable<double> opacityPercent)
Copy link
Contributor

@eliezerpMS eliezerpMS Sep 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CompositionRadialGradientBrush TranslateRadialGradientFill(TranslationContext context, RadialGradientFill shapeFill, TrimmedAnimatable opacityPercent) [](start = 7, length = 159)

Nit: maybe make this line shorter #Closed

Copy link
Contributor

@eliezerpMS eliezerpMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@simeoncran simeoncran merged commit 6e94ea3 into master Sep 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the RadialGradientFill1 branch September 9, 2019 16:56
@michael-hawker michael-hawker added this to the 6.0 milestone Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants