sw_engine: float casted on the unsigned int type

uint32_t -> int32_t
This commit is contained in:
Mira Grudzinska 2022-01-20 13:55:05 +01:00 committed by Hermet Park
parent 0f87685c85
commit c44d667f10

View file

@ -84,8 +84,8 @@ bool imagePrepare(SwImage* image, const Matrix* transform, const SwBBox& clipReg
//Fast track: Non-transformed image but just shifted.
if (image->direct) {
image->ox = -static_cast<uint32_t>(round(transform->e13));
image->oy = -static_cast<uint32_t>(round(transform->e23));
image->ox = -static_cast<int32_t>(round(transform->e13));
image->oy = -static_cast<int32_t>(round(transform->e23));
//Figure out the scale factor by transform matrix
} else {
auto scaleX = sqrtf((transform->e11 * transform->e11) + (transform->e21 * transform->e21));