mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Very minor code cleanup in 4 tools
This commit is contained in:
parent
f1ea8e30b2
commit
88e95ce35f
|
@ -17,7 +17,7 @@ func apply_selection(position : Vector2) -> void:
|
|||
selection_bitmap_copy.set_bit_rect(full_rect, false)
|
||||
|
||||
var cel_image := Image.new()
|
||||
cel_image.copy_from(project.frames[project.current_frame].cels[project.current_layer].image)
|
||||
cel_image.copy_from(_get_draw_image())
|
||||
cel_image.lock()
|
||||
var color := cel_image.get_pixelv(position)
|
||||
for x in cel_image.get_width():
|
||||
|
|
|
@ -103,9 +103,8 @@ func lasso_selection(bitmap : BitMap, points : PoolVector2Array) -> void:
|
|||
else:
|
||||
bitmap.set_bit(point, !_subtract)
|
||||
|
||||
var image = _get_draw_image()
|
||||
var v := Vector2()
|
||||
var image_size = image.get_size()
|
||||
var image_size : Vector2 = project.size
|
||||
for x in image_size.x:
|
||||
v.x = x
|
||||
for y in image_size.y:
|
||||
|
|
|
@ -12,7 +12,7 @@ func apply_selection(position : Vector2) -> void:
|
|||
selection_bitmap_copy.set_bit_rect(full_rect, false)
|
||||
|
||||
var cel_image := Image.new()
|
||||
cel_image.copy_from(project.frames[project.current_frame].cels[project.current_layer].image)
|
||||
cel_image.copy_from(_get_draw_image())
|
||||
cel_image.lock()
|
||||
flood_fill(position, cel_image, selection_bitmap_copy)
|
||||
|
||||
|
|
|
@ -140,9 +140,8 @@ func lasso_selection(bitmap : BitMap, points : PoolVector2Array) -> void:
|
|||
else:
|
||||
bitmap.set_bit(point, !_subtract)
|
||||
|
||||
var image = _get_draw_image()
|
||||
var v := Vector2()
|
||||
var image_size = image.get_size()
|
||||
var image_size : Vector2 = project.size
|
||||
for x in image_size.x:
|
||||
v.x = x
|
||||
for y in image_size.y:
|
||||
|
|
Loading…
Reference in a new issue