diff options
author | rodri <rgl@antares-labs.eu> | 2024-08-02 16:04:54 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-08-02 16:04:54 +0000 |
commit | 3bf0f4fdcf9e1a61881c20ee8162924f952ba8e0 (patch) | |
tree | f30a871b709d9af2e7e7bb2e8e35f3a47834a493 | |
parent | c47e5c9807a0d3bf86c2bc227482584aaca7bb9c (diff) | |
download | libgraphics-3bf0f4fdcf9e1a61881c20ee8162924f952ba8e0.tar.gz libgraphics-3bf0f4fdcf9e1a61881c20ee8162924f952ba8e0.tar.bz2 libgraphics-3bf0f4fdcf9e1a61881c20ee8162924f952ba8e0.zip |
fb: fix the destination drawing rectangle.
-rw-r--r-- | fb.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } |