mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
Added an assertion to catch some unexpected behaviour in the CoreGraphics gradient renderer
This commit is contained in:
parent
0cd926a199
commit
01e2e53160
1 changed files with 4 additions and 0 deletions
|
|
@ -707,6 +707,10 @@ static CGGradientRef createGradient (const ColourGradient& g, CGColorSpaceRef co
|
|||
*comps++ = (CGFloat) colour.getFloatBlue();
|
||||
*comps++ = (CGFloat) colour.getFloatAlpha();
|
||||
locations[i] = (CGFloat) g.getColourPosition (i);
|
||||
|
||||
// There's a bug (?) in the way the CG renderer works where it seems
|
||||
// to go wrong if you have two colour stops both at position 0..
|
||||
jassert (i == 0 || locations[i] != 0);
|
||||
}
|
||||
|
||||
return CGGradientCreateWithColorComponents (colourSpace, components, locations, (size_t) numColours);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue