mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fixed bug in rectangle painting and added example
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user