mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
ColourGradient: Create lookup tables using non-premultiplied colours
The OpenGL renderer uses ColourGradient::createLookupTable to generate gradient textures. However, the tweening method used was different to the tweening used by CoreGraphics gradients, and by the software renderer. Gradient tweening is now computed using non-premultiplied colours, to ensure consistency between gradients rendered using OpenGL, and with other renderers.
This commit is contained in:
parent
9cfbccca8e
commit
a59cba010b
6 changed files with 61 additions and 17 deletions
|
|
@ -1139,7 +1139,7 @@ struct StateHelpers
|
|||
|
||||
JUCE_CHECK_OPENGL_ERROR;
|
||||
PixelARGB lookup[gradientTextureSize];
|
||||
gradient.createLookupTable (lookup, gradientTextureSize);
|
||||
gradient.createLookupTable (lookup);
|
||||
gradientTextures.getUnchecked (activeGradientIndex)->loadARGB (lookup, gradientTextureSize, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue