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

Add Transform and RelativeTransform properties for Brush'es #6343

Closed
wieslawsoltes opened this issue Aug 1, 2021 · 2 comments · Fixed by #6344
Closed

Add Transform and RelativeTransform properties for Brush'es #6343

wieslawsoltes opened this issue Aug 1, 2021 · 2 comments · Fixed by #6344

Comments

@wieslawsoltes
Copy link
Collaborator

wieslawsoltes commented Aug 1, 2021

Is your feature request related to a problem? Please describe.

Add support for Transform and RelativeTransform (not sure if this one is needed) property for Brush'es (LinearGradientBrush, RadialGradientBrush and VisualBrush).

Describe the solution you'd like

Add to Brush two transformation properties: Transform and RelativeTransform. The properties enable rotate, scale, skew, and translate a brush's contents.

Describe alternatives you've considered

Did try manually transform brush properties, but that doesn't really work.

Additional context

It is very useful for example when converting Svg paint servers to Avalonia brushes. As paint server can use user space coordinates and bounding box coordinates and can have transform property set for brush transformations. Right now I am using LinearGradientBrush, RadialGradientBrush and VisualBrush and all of them require transform.

SkiaSharp support local matrix parameter when creating shaders for brushes:

That is what I use for Svg rendering.

I am converting the svg brushes to WPF xaml here https://github.com/wieslawsoltes/SvgGradientsDemo for reference.

@maxkatz6
Copy link
Member

maxkatz6 commented Aug 1, 2021

Same issue #5768

@wieslawsoltes
Copy link
Collaborator Author

Same issue #5768

I should have searched issue before posting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants