[SOLVED] Diagonal gradients - possible?

I have an SVG with a complicated diagonal gradient that I would like to draw, but I’m not sure how:image

Fill: Linear Gradient
#FF8A28 @ 0%
#DD01B3 @ 45.77%
#2DA6F4 @ 100%

Any tips?

See ColourGradient.

juce::ColourGradient gradient;
gradient.point1 = bottomLeft;
gradient.point2 = topRight;
gradient.addColour (0.0, blue);
// ...
gradient.addColour (1.0, yellow);
1 Like

Got it, thanks! Hadn’t quite realized the 2 points could be any arbitrary positions,

Cheers