mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-09-28 13:14:42 -04:00
Fix out-of-bounds error when color picking outside the image (#291)
This commit is contained in:
parent
65828b328a
commit
f715b566b1
2 changed files with 7 additions and 1 deletions
|
@ -229,7 +229,7 @@ func scale_image(width : int, height : int, interpolation : int) -> void:
|
|||
# Different method for scale3x
|
||||
if interpolation == 5:
|
||||
var times : Vector2 = Vector2(ceil(width/(3.0*sprite.get_width())),ceil(height/(3.0*sprite.get_height())))
|
||||
for j in range(max(times.x,times.y)):
|
||||
for _j in range(max(times.x,times.y)):
|
||||
sprite.copy_from(scale3X(sprite))
|
||||
sprite.resize(width, height, 0)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue