Skip to content

Add support for path gradient shader in SKShader Class #3134

Closed
@RamarajMarimuthu

Description

Is your feature request related to a problem?

We aim to achieve a path gradient effect using the SkiaSharp library. However, there isn't a shader effect available that replicates the path gradient functionality found in the System.Drawing library.

We are expecting a SKShader.CreatePathGradient() method in SKShader Class.

Please refer the below System.Drawing reference links,
https://learn.microsoft.com/en-us/dotnet/desktop/winforms/advanced/how-to-create-a-path-gradient?view=netframeworkdesktop-4.8
https://learn.microsoft.com/en-us/dotnet/api/system.drawing.drawing2d.pathgradientbrush?view=windowsdesktop-9.0

Note: We are focusing on cross-platform rendering, which means we cannot utilize System.Drawing APIs.

Describe the solution you would like

We are expecting a SKShader.CreatePathGradient() method in SKShader Class, which works more similar to PathGradientBrush.

Describe alternatives you have considered

Currently, we are using Radial Gradient Shader as an alternative for Path Gradient Shader.

Additional context

Our requirement is to draw the path gradient effect in image file as similar to Microsoft Word.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions