diff options
| author | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 18:12:40 +0500 |
|---|---|---|
| committer | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 18:12:40 +0500 |
| commit | b4995f979d127cea667b4e2b71c91e9db4ab52ef (patch) | |
| tree | fbebc775e10932bace8d6a7c3481b1ba200c64db /src/Fl_Graphics_Driver.cxx | |
| parent | 9575eb0a1ffa8150f70f88b5f6b55f342c3c0088 (diff) | |
wip
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
| -rw-r--r-- | src/Fl_Graphics_Driver.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx index fe943d780..793a14d20 100644 --- a/src/Fl_Graphics_Driver.cxx +++ b/src/Fl_Graphics_Driver.cxx @@ -1066,15 +1066,17 @@ void Fl_Scalable_Graphics_Driver::draw_image_rescale(void *buf, Fl_Draw_Image_Cb if (L == 0) L = W*aD; int depth = mono ? (aD%2==0?2:1) : aD; uchar *tmp_buf = new uchar[W*H*depth]; + int i; if (cb) { - for (int i = 0; i < H; i++) { + for (i = 0; i < H; i++) { cb(buf, 0, i, W, tmp_buf + i * W * depth); } } else { uchar *q, *p = tmp_buf; - for (int i = 0; i < H; i++) { + for (i = 0; i < H; i++) { q = (uchar*)buf + i * L; - for (int j = 0; j < W; j++) { + int j; + for (j = 0; j < W; j++) { memcpy(p, q, depth); p += depth; q += D; } |
