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

Gradient Builder fluent API #94

Closed
mgierlasinski opened this issue Jun 22, 2020 · 0 comments · Fixed by #102
Closed

Gradient Builder fluent API #94

mgierlasinski opened this issue Jun 22, 2020 · 0 comments · Fixed by #102
Assignees
Labels
🛠️ enhancement New feature or request
Milestone

Comments

@mgierlasinski
Copy link
Owner

Provide fluent API:

var gradients = new GradientBuilder()
    .AddLinearGradient(g => g
        .Rotate(20)
        .Repeat()
        .AddStop(Color.Red, Offset.Prop(0.2))
        .AddStop(Color.Blue, Offset.Prop(0.4)))
    .AddRadialGradient(g => g
        .Circle().At(30, 30)
        .OfSize(200, 200)
        .StretchTo(RadialGradientSize.FarthestSide)
        .Repeat()
        .AddStops(Color.Red, Color.Green, Color.Blue))
    .Build();

Extensions for GradientBuilder:

gradientView.GradientSource = builder.ToSource();
@mgierlasinski mgierlasinski added the 🛠️ enhancement New feature or request label Jun 22, 2020
@mgierlasinski mgierlasinski added this to the v1.1.1 milestone Jun 22, 2020
@mgierlasinski mgierlasinski self-assigned this Jun 22, 2020
@mgierlasinski mgierlasinski modified the milestones: v1.1.1, v1.2.0 Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant