1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Fix brushes being able to get drawn outside of the selection, if the selection is outside the canvas

This commit is contained in:
Emmanouil Papadeas 2024-04-13 14:31:48 +03:00
parent a626772357
commit 79b18fc242

View file

@ -467,7 +467,7 @@ func remove_unselected_parts_of_brush(brush: Image, dst: Vector2i) -> Image:
for x in brush_size.x:
for y in brush_size.y:
var pos := Vector2i(x, y) + dst
if !project.selection_map.is_pixel_selected(pos):
if !project.can_pixel_get_drawn(pos):
new_brush.set_pixel(x, y, Color(0))
return new_brush