mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Compare commits
3 commits
824d73b8db
...
08162e4d7e
Author | SHA1 | Date | |
---|---|---|---|
08162e4d7e | |||
a698668930 | |||
59254b943f |
|
@ -148,6 +148,7 @@ func draw_end(pos: Vector2i) -> void:
|
|||
_start = Vector2i.ZERO
|
||||
_dest = Vector2i.ZERO
|
||||
_drawing = false
|
||||
Global.canvas.previews_sprite.texture = null
|
||||
_displace_origin = false
|
||||
cursor_text = ""
|
||||
super.draw_end(pos)
|
||||
|
@ -174,8 +175,6 @@ func draw_preview() -> void:
|
|||
image.set_pixelv(point, Color.WHITE)
|
||||
var texture := ImageTexture.create_from_image(image)
|
||||
canvas.texture = texture
|
||||
else:
|
||||
canvas.texture = null
|
||||
|
||||
|
||||
func _draw_shape(origin: Vector2i, dest: Vector2i) -> void:
|
||||
|
|
|
@ -128,7 +128,6 @@ func draw_end(pos: Vector2i) -> void:
|
|||
func draw_preview() -> void:
|
||||
var previews := Global.canvas.previews_sprite
|
||||
if not _drawing:
|
||||
previews.texture = null
|
||||
return
|
||||
var points := _bezier()
|
||||
var image := Image.create(
|
||||
|
@ -207,6 +206,7 @@ func _clear() -> void:
|
|||
_curve.clear_points()
|
||||
_fill_inside_rect = Rect2i()
|
||||
_drawing = false
|
||||
Global.canvas.previews_sprite.texture = null
|
||||
_editing_out_control_point = false
|
||||
Global.canvas.previews.queue_redraw()
|
||||
|
||||
|
|
|
@ -142,6 +142,7 @@ func draw_end(pos: Vector2i) -> void:
|
|||
_start = Vector2.ZERO
|
||||
_dest = Vector2.ZERO
|
||||
_drawing = false
|
||||
Global.canvas.previews_sprite.texture = null
|
||||
_displace_origin = false
|
||||
cursor_text = ""
|
||||
super.draw_end(pos)
|
||||
|
@ -163,8 +164,6 @@ func draw_preview() -> void:
|
|||
image.set_pixelv(point, Color.WHITE)
|
||||
var texture := ImageTexture.create_from_image(image)
|
||||
canvas.texture = texture
|
||||
else:
|
||||
canvas.texture = null
|
||||
|
||||
|
||||
func _draw_shape() -> void:
|
||||
|
|
|
@ -68,8 +68,6 @@ func draw_preview() -> void:
|
|||
image.set_pixelv(point, Color.WHITE)
|
||||
var texture := ImageTexture.create_from_image(image)
|
||||
canvas.texture = texture
|
||||
else:
|
||||
canvas.texture = null
|
||||
|
||||
|
||||
func apply_selection(_position: Vector2i) -> void:
|
||||
|
@ -111,6 +109,7 @@ func apply_selection(_position: Vector2i) -> void:
|
|||
|
||||
Global.canvas.selection.big_bounding_rectangle = project.selection_map.get_used_rect()
|
||||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
Global.canvas.previews_sprite.texture = null
|
||||
|
||||
|
||||
func set_ellipse(selection_map: SelectionMap, pos: Vector2i) -> void:
|
||||
|
|
|
@ -54,8 +54,6 @@ func draw_preview() -> void:
|
|||
image.set_pixelv(draw_point, Color.WHITE)
|
||||
var texture := ImageTexture.create_from_image(image)
|
||||
canvas.texture = texture
|
||||
else:
|
||||
canvas.texture = null
|
||||
|
||||
|
||||
func apply_selection(_position) -> void:
|
||||
|
@ -82,6 +80,7 @@ func apply_selection(_position) -> void:
|
|||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
_draw_points.clear()
|
||||
_last_position = Vector2.INF
|
||||
Global.canvas.previews_sprite.texture = null
|
||||
|
||||
|
||||
func lasso_selection(
|
||||
|
|
|
@ -82,8 +82,6 @@ func draw_preview() -> void:
|
|||
image.set_pixelv(draw_point, Color.WHITE)
|
||||
var texture := ImageTexture.create_from_image(image)
|
||||
canvas.texture = texture
|
||||
else:
|
||||
canvas.texture = null
|
||||
|
||||
|
||||
func apply_selection(pos: Vector2i) -> void:
|
||||
|
@ -111,6 +109,7 @@ func apply_selection(pos: Vector2i) -> void:
|
|||
Global.canvas.selection.commit_undo("Select", undo_data)
|
||||
_draw_points.clear()
|
||||
_last_position = Vector2.INF
|
||||
Global.canvas.previews_sprite.texture = null
|
||||
|
||||
|
||||
func paint_selection(
|
||||
|
|
|
@ -89,8 +89,6 @@ func draw_preview() -> void:
|
|||
image.set_pixelv(draw_point, Color.WHITE)
|
||||
var texture := ImageTexture.create_from_image(image)
|
||||
previews.texture = texture
|
||||
else:
|
||||
previews.texture = null
|
||||
|
||||
|
||||
func apply_selection(pos: Vector2i) -> void:
|
||||
|
@ -122,6 +120,7 @@ func apply_selection(pos: Vector2i) -> void:
|
|||
|
||||
func _clear() -> void:
|
||||
_ongoing_selection = false
|
||||
Global.canvas.previews_sprite.texture = null
|
||||
_draw_points.clear()
|
||||
_ready_to_apply = false
|
||||
Global.canvas.previews.queue_redraw()
|
||||
|
|
Loading…
Reference in a new issue