forked from AbleOS/ableos
Fixed scaling bug
This commit is contained in:
parent
ad351155da
commit
8d36083729
|
@ -204,15 +204,16 @@ put_scaled := fn(surface: Surface, source: Surface, pos: Vec2(int), size: Vec2(i
|
||||||
subpixel_pos.x = 0
|
subpixel_pos.x = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue