summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-08-02 16:04:54 +0000
committerrodri <rgl@antares-labs.eu>2024-08-02 16:04:54 +0000
commit3bf0f4fdcf9e1a61881c20ee8162924f952ba8e0 (patch)
treef30a871b709d9af2e7e7bb2e8e35f3a47834a493
parentc47e5c9807a0d3bf86c2bc227482584aaca7bb9c (diff)
downloadlibgraphics-3bf0f4fdcf9e1a61881c20ee8162924f952ba8e0.tar.gz
libgraphics-3bf0f4fdcf9e1a61881c20ee8162924f952ba8e0.tar.bz2
libgraphics-3bf0f4fdcf9e1a61881c20ee8162924f952ba8e0.zip
fb: fix the destination drawing rectangle.
-rw-r--r--fb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fb.c b/fb.c
index 2cf05da..4806604 100644
--- a/fb.c
+++ b/fb.c
@@ -99,7 +99,7 @@ framebufctl_draw(Framebufctl *ctl, Image *dst)
qlock(ctl);
fb = ctl->getfb(ctl);
- loadimage(dst, dst->r, (uchar*)fb->cb, Dx(fb->r)*Dy(fb->r)*4);
+ loadimage(dst, rectaddpt(fb->r, dst->r.min), (uchar*)fb->cb, Dx(fb->r)*Dy(fb->r)*4);
qunlock(ctl);
}
@@ -149,7 +149,7 @@ framebufctl_memdraw(Framebufctl *ctl, Memimage *dst)
qlock(ctl);
fb = ctl->getfb(ctl);
- loadmemimage(dst, dst->r, (uchar*)fb->cb, Dx(fb->r)*Dy(fb->r)*4);
+ loadmemimage(dst, rectaddpt(fb->r, dst->r.min), (uchar*)fb->cb, Dx(fb->r)*Dy(fb->r)*4);
qunlock(ctl);
}