Fixed a general ImageComponent scaling issue caused by incorrect rounding.

This commit is contained in:
Leon Styhre 2021-10-17 21:51:21 +02:00
parent 975ff0eb69
commit 1166539466

View file

@ -130,9 +130,9 @@ void ImageComponent::resize()
}
}
mSize.x = floorf(mSize.x);
mSize.y = floorf(mSize.y);
// mSize.y() should already be rounded.
mSize.x = ceilf(mSize.x);
mSize.y = ceilf(mSize.y);
mTexture->rasterizeAt(static_cast<size_t>(mSize.x), static_cast<size_t>(mSize.y));
onSizeChanged();