1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-19 01:04:20 +00:00

Don't apply FillType transform twice in CoreGraphicsContext::drawGradient()

This commit is contained in:
ed 2019-08-05 11:15:05 +01:00
parent 77cb157db0
commit a5e5831ea0

View file

@ -754,14 +754,12 @@ void CoreGraphicsContext::drawGradient()
auto& g = *state->fillType.gradient;
auto p1 = convertToCGPoint (g.point1);
auto p2 = convertToCGPoint (g.point2);
state->fillType.transform.transformPoints (p1.x, p1.y, p2.x, p2.y);
if (state->gradient == nullptr)
state->gradient = createGradient (g, rgbColourSpace);
auto p1 = convertToCGPoint (g.point1);
auto p2 = convertToCGPoint (g.point2);
if (g.isRadial)
CGContextDrawRadialGradient (context, state->gradient, p1, 0, p1, g.point1.getDistanceFrom (g.point2),
kCGGradientDrawsBeforeStartLocation | kCGGradientDrawsAfterEndLocation);