I have an old juce program that uses juce 1.46. It has a modification to glyph rendering that changes alpha level like below;
forcedinline void handleEdgeTablePixel (const int x, const int alphaLevel) const throw()
{
lineStart [x] = (uint8) gammaCorrectTable[alphaLevel];
}
forcedinline void handleEdgeTableLine (const int x, int width, const int alphaLevel) const throw()
{
uint8* d = lineStart + x;
while (--width >= 0)
*d++ = (uint8) gammaCorrectTable[alphaLevel];
}
I need to do it in new JUCE. I tried to do some modification in EdgeTableFillers::SolidColour like below;
forcedinline void handleEdgeTablePixel (int x, int alphaLevel) const noexcept
{
if (replaceExisting)
getPixel (x)->set (sourceColour);
else
getPixel (x)->blend (sourceColour, (uint32) gammaCorrectTable[alphaLevel]);
}
but I didnt get same results. I noticed EdgeTableFillers::SolidColour used by other things too.
I need a simple settings/modification to increase gamma level of texts.