-
Notifications
You must be signed in to change notification settings - Fork 73
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
Conversation
public Vector2? EllipseCenter { get; set; } | ||
|
||
// Default is 0.5, 0.5 | ||
public Vector2? EllipseRadius { get; set; } |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -2662,6 +2646,113 @@ CompositionLinearGradientBrush TranslateLinearGradientFill(TranslationContext co | |||
return result; | |||
} | |||
|
|||
CompositionRadialGradientBrush TranslateRadialGradientFill(TranslationContext context, RadialGradientFill shapeFill, TrimmedAnimatable<double> opacityPercent) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.