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:
parent
77cb157db0
commit
a5e5831ea0
1 changed files with 3 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue