fixed bug in rectangle painting and added example

pull/2/merge
HW 13 years ago
parent f739baff5f
commit 1271d908dc

@ -312,6 +312,7 @@ static int paintRect(lua_State *L) {
x / 2);
for(cy = 0; cy < h; cy++) {
memset(dstptr, c | (c << 4), w / 2);
dstptr += dst->pitch;
}
if(w & 1) {
dstptr = (uint8_t*)(dst->data +

@ -13,6 +13,8 @@ if face:hasKerning() then
print("has kerning")
end
fb.bb:paintRect(1,1,599,300,7);
renderUtf8Text(fb.bb, 100, 100, face, "h", "AV T.T: gxyt!", true)
renderUtf8Text(fb.bb, 100, 200, face, "h", "AV T.T: gxyt!", false)

Loading…
Cancel
Save