undo wrong use of addblitFrom()

rendertext.lua did use addblitFrom() for rendering text - i.e. blitting
the letters to a BlitBuffer. However, it used intensity=1.0, which is
the same as doing a (faster, more efficient) blitFrom(). So use that
instead.

What was probably intented here is a different kind of blitting - using
the bitbuffer of the glyph as a mask.
pull/931/head
Hans-Werner Hilse 10 years ago
parent 0ca3dd8cad
commit adbcdddb56

@ -163,11 +163,11 @@ function RenderText:renderUtf8Text(buffer, x, y, face, text, kerning, bold, bgco
if kerning and (prevcharcode ~= 0) then
pen_x = pen_x + face.ftface:getKerning(prevcharcode, charcode)
end
buffer:addblitFrom(
buffer:blitFrom(
glyph.bb,
x + pen_x + glyph.l, y - glyph.t,
0, 0,
glyph.bb:getWidth(), glyph.bb:getHeight(), 1)
glyph.bb:getWidth(), glyph.bb:getHeight())
pen_x = pen_x + glyph.ax
prevcharcode = charcode
end -- if pen_x < text_width

Loading…
Cancel
Save