1
0
Fork 0
forked from AbleOS/ableos

Fixed scaling bug

This commit is contained in:
peony 2024-10-19 17:40:42 +02:00
parent ad351155da
commit 8d36083729

View file

@ -208,11 +208,12 @@ put_scaled := fn(surface: Surface, source: Surface, pos: Vec2(int), size: Vec2(i
pos.x += 1 pos.x += 1
} }
if size.y < source.width { if size.y < source.height {
if source_pos.y % one_up_step.y == 0 { if source_pos.y % one_up_step.y == 0 {
source_pos.y += 1 source_pos.y += 1
} }
source_pos.y += step_size.y source_pos.y += step_size.y
} else {
subpixel_pos.y += 1 subpixel_pos.y += 1
if subpixel_pos.y > step_size.y | source_pos.y % one_up_step.y == 0 & subpixel_pos.y >= step_size.y { if subpixel_pos.y > step_size.y | source_pos.y % one_up_step.y == 0 & subpixel_pos.y >= step_size.y {
source_pos.y += 1 source_pos.y += 1