mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-07 10:59:49 +00:00
Remove unnecessary image.lock() lines
This commit is contained in:
parent
e8b36bbc61
commit
1827381439
|
@ -693,7 +693,6 @@ func move_bitmap_values(bitmap : BitMap, move_offset := true) -> void:
|
||||||
var image : Image = bitmap_to_image(bitmap)
|
var image : Image = bitmap_to_image(bitmap)
|
||||||
var selection_rect := image.get_used_rect()
|
var selection_rect := image.get_used_rect()
|
||||||
var smaller_image := image.get_rect(selection_rect)
|
var smaller_image := image.get_rect(selection_rect)
|
||||||
image.lock()
|
|
||||||
image.fill(Color(0))
|
image.fill(Color(0))
|
||||||
var dst := selection_position
|
var dst := selection_position
|
||||||
var x_diff = selection_end.x - size.x
|
var x_diff = selection_end.x - size.x
|
||||||
|
@ -749,7 +748,6 @@ func resize_bitmap_values(bitmap : BitMap, new_size : Vector2, flip_x : bool, fl
|
||||||
dst.y = 0
|
dst.y = 0
|
||||||
else:
|
else:
|
||||||
self.selection_offset.y = 0
|
self.selection_offset.y = 0
|
||||||
image.lock()
|
|
||||||
image.fill(Color(0))
|
image.fill(Color(0))
|
||||||
smaller_image.resize(new_size.x, new_size.y, Image.INTERPOLATE_NEAREST)
|
smaller_image.resize(new_size.x, new_size.y, Image.INTERPOLATE_NEAREST)
|
||||||
if flip_x:
|
if flip_x:
|
||||||
|
|
|
@ -47,5 +47,6 @@ func _pick_color(position : Vector2) -> void:
|
||||||
|
|
||||||
image.lock()
|
image.lock()
|
||||||
var color := image.get_pixelv(position)
|
var color := image.get_pixelv(position)
|
||||||
|
image.unlock()
|
||||||
var button := BUTTON_LEFT if _color_slot == 0 else BUTTON_RIGHT
|
var button := BUTTON_LEFT if _color_slot == 0 else BUTTON_RIGHT
|
||||||
Tools.assign_color(color, button, false)
|
Tools.assign_color(color, button, false)
|
||||||
|
|
Loading…
Reference in a new issue