mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-09 06:04:03 +00:00
sw_engine raster: fix a mistake by the previous hot refactoring.
This commit is contained in:
parent
e76091a283
commit
8ef31f6cd0
1 changed files with 2 additions and 2 deletions
|
@ -590,7 +590,7 @@ static bool _rasterDownScaledRleRGBAImage(SwSurface* surface, const SwImage* ima
|
||||||
auto ey1 = span->y * itransform->e12 + itransform->e13;
|
auto ey1 = span->y * itransform->e12 + itransform->e13;
|
||||||
auto ey2 = span->y * itransform->e22 + itransform->e23;
|
auto ey2 = span->y * itransform->e22 + itransform->e23;
|
||||||
auto dst = &surface->buffer[span->y * surface->stride + span->x];
|
auto dst = &surface->buffer[span->y * surface->stride + span->x];
|
||||||
for (uint32_t x = span->x; x < span->len; ++x, ++dst) {
|
for (uint32_t x = span->x; x < ((uint32_t)span->x) + span->len; ++x, ++dst) {
|
||||||
auto rX = static_cast<uint32_t>(roundf(x * itransform->e11 + ey1));
|
auto rX = static_cast<uint32_t>(roundf(x * itransform->e11 + ey1));
|
||||||
auto rY = static_cast<uint32_t>(roundf(x * itransform->e21 + ey2));
|
auto rY = static_cast<uint32_t>(roundf(x * itransform->e21 + ey2));
|
||||||
if (rX >= w || rY >= h) continue;
|
if (rX >= w || rY >= h) continue;
|
||||||
|
@ -616,7 +616,7 @@ static bool _rasterUpScaledRleRGBAImage(SwSurface* surface, const SwImage* image
|
||||||
auto ey1 = span->y * itransform->e12 + itransform->e13;
|
auto ey1 = span->y * itransform->e12 + itransform->e13;
|
||||||
auto ey2 = span->y * itransform->e22 + itransform->e23;
|
auto ey2 = span->y * itransform->e22 + itransform->e23;
|
||||||
auto dst = &surface->buffer[span->y * surface->stride + span->x];
|
auto dst = &surface->buffer[span->y * surface->stride + span->x];
|
||||||
for (uint32_t x = span->x; x < span->len; ++x, ++dst) {
|
for (uint32_t x = span->x; x < ((uint32_t)span->x) + span->len; ++x, ++dst) {
|
||||||
auto fX = x * itransform->e11 + ey1;
|
auto fX = x * itransform->e11 + ey1;
|
||||||
auto fY = x * itransform->e21 + ey2;
|
auto fY = x * itransform->e21 + ey2;
|
||||||
auto rX = static_cast<uint32_t>(roundf(fX));
|
auto rX = static_cast<uint32_t>(roundf(fX));
|
||||||
|
|
Loading…
Add table
Reference in a new issue