mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 15:39:49 +00:00
Fix image brushes being drawn outside the selection
This commit is contained in:
parent
0cb0f9c1bd
commit
30d279c494
|
@ -386,8 +386,8 @@ func draw_tool_brush(position: Vector2) -> void:
|
||||||
if dst_rect.size == Vector2.ZERO:
|
if dst_rect.size == Vector2.ZERO:
|
||||||
return
|
return
|
||||||
var src_rect := Rect2(dst_rect.position - dst, dst_rect.size)
|
var src_rect := Rect2(dst_rect.position - dst, dst_rect.size)
|
||||||
dst = dst_rect.position
|
|
||||||
var brush_image: Image = remove_unselected_parts_of_brush(_brush_image, dst)
|
var brush_image: Image = remove_unselected_parts_of_brush(_brush_image, dst)
|
||||||
|
dst = dst_rect.position
|
||||||
_draw_brush_image(brush_image, src_rect, dst)
|
_draw_brush_image(brush_image, src_rect, dst)
|
||||||
|
|
||||||
# Handle Mirroring
|
# Handle Mirroring
|
||||||
|
|
Loading…
Reference in a new issue