diff options
Diffstat (limited to 'src/plot/32bpp.c')
-rw-r--r-- | src/plot/32bpp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plot/32bpp.c b/src/plot/32bpp.c index 28c7962..220db44 100644 --- a/src/plot/32bpp.c +++ b/src/plot/32bpp.c @@ -370,7 +370,7 @@ static bool bitmap_scaled(nsfb_t *nsfb, const nsfb_bbox_t *loc, /* get veritcal (y) and horizontal (x) scale factors; both integer * part and remainder */ dx = bmp_width / width; - dy = bmp_height / height; + dy = (bmp_height / height) * bmp_stride; dxr = bmp_width % width; dyr = bmp_height % height; rx = ry = 0; /* initialise remainder counters */ @@ -413,7 +413,7 @@ static bool bitmap_scaled(nsfb_t *nsfb, const nsfb_bbox_t *loc, } } /* handle vertical interpolation */ - yoff += bmp_stride * dy; + yoff += dy; ry += dyr; if (ry >= height) { yoff += bmp_stride; @@ -441,7 +441,7 @@ static bool bitmap_scaled(nsfb_t *nsfb, const nsfb_bbox_t *loc, } } /* handle vertical interpolation */ - yoff += bmp_stride * dy; + yoff += dy; ry += dyr; if (ry >= height) { yoff += bmp_stride; |