mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Sync (#346)
This commit is contained in:
parent
0506701874
commit
97847a94c7
|
@ -133,7 +133,7 @@ func cut() -> void: # This is basically the same as copy + delete
|
||||||
var brush = _clipboard.get_rect(_clipboard.get_used_rect())
|
var brush = _clipboard.get_rect(_clipboard.get_used_rect())
|
||||||
project.brushes.append(brush)
|
project.brushes.append(brush)
|
||||||
Brushes.add_project_brush(brush)
|
Brushes.add_project_brush(brush)
|
||||||
move_end() # The selection_rectangle can be used while is moved, this prevents malfunctioning
|
move_end() # The selection_rectangle can be used while is moving, this prevents malfunctioning
|
||||||
image.blit_rect(_clear_image, rect, _selected_rect.position)
|
image.blit_rect(_clear_image, rect, _selected_rect.position)
|
||||||
commit_undo("Draw", undo_data)
|
commit_undo("Draw", undo_data)
|
||||||
|
|
||||||
|
@ -147,6 +147,7 @@ func paste() -> void:
|
||||||
var size := _selected_rect.size
|
var size := _selected_rect.size
|
||||||
var rect = Rect2(Vector2.ZERO, size)
|
var rect = Rect2(Vector2.ZERO, size)
|
||||||
image.blend_rect(_clipboard, rect, _selected_rect.position)
|
image.blend_rect(_clipboard, rect, _selected_rect.position)
|
||||||
|
move_end() # The selection_rectangle can be used while is moving, this prevents malfunctioning
|
||||||
commit_undo("Draw", undo_data)
|
commit_undo("Draw", undo_data)
|
||||||
|
|
||||||
|
|
||||||
|
@ -158,6 +159,7 @@ func delete() -> void:
|
||||||
var rect = Rect2(Vector2.ZERO, size)
|
var rect = Rect2(Vector2.ZERO, size)
|
||||||
_clear_image.resize(size.x, size.y, Image.INTERPOLATE_NEAREST)
|
_clear_image.resize(size.x, size.y, Image.INTERPOLATE_NEAREST)
|
||||||
image.blit_rect(_clear_image, rect, _selected_rect.position)
|
image.blit_rect(_clear_image, rect, _selected_rect.position)
|
||||||
|
move_end() # The selection_rectangle can be used while is moving, this prevents malfunctioning
|
||||||
commit_undo("Draw", undo_data)
|
commit_undo("Draw", undo_data)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue