mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Fixed issue where the canvas was stuck on 64x64 size
This commit is contained in:
parent
d1e5b23f0b
commit
04fe708560
|
@ -110,6 +110,10 @@ func _input(event : InputEvent) -> void:
|
|||
var ld := 0
|
||||
var ld_amount := 0.1
|
||||
|
||||
west_limit = location.x
|
||||
east_limit = location.x + size.x
|
||||
north_limit = location.y
|
||||
south_limit = location.y + size.y
|
||||
if Global.selected_pixels.size() != 0:
|
||||
west_limit = max(west_limit, Global.selection_rectangle.polygon[0].x)
|
||||
east_limit = min(east_limit, Global.selection_rectangle.polygon[2].x)
|
||||
|
|
|
@ -88,7 +88,7 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void:
|
|||
var cropped_image := Image.new()
|
||||
cropped_image = image.get_rect(Rect2(frame_width * xx, frame_height * yy, frame_width, frame_height))
|
||||
canvas.size = cropped_image.get_size()
|
||||
image.convert(Image.FORMAT_RGBA8)
|
||||
cropped_image.convert(Image.FORMAT_RGBA8)
|
||||
cropped_image.lock()
|
||||
var tex := ImageTexture.new()
|
||||
tex.create_from_image(cropped_image, 0)
|
||||
|
|
Loading…
Reference in a new issue