mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
unify color specification
colors were a mixture of 4bpp integers (0=white, 15=black) and fractional blackness levels (0=white, 1.0=black) before. This is now unified to use the color specification of the Blitbuffer API.
This commit is contained in:
@@ -149,9 +149,7 @@ function RenderText:renderUtf8Text(buffer, x, y, face, text, kerning, bold, fgco
|
||||
end
|
||||
|
||||
if not fgcolor then
|
||||
fgcolor = BlitBuffer.Color8(0xFF)
|
||||
elseif type(fgcolor) == "number" then
|
||||
fgcolor = BlitBuffer.Color8(fgcolor*0xFF)
|
||||
fgcolor = BlitBuffer.COLOR_BLACK
|
||||
end
|
||||
|
||||
-- may still need more adaptive pen placement when kerning,
|
||||
|
||||
Reference in New Issue
Block a user