mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-03-14 15:25:17 +00:00
Fix lasso and polygon select tools not selecting all pixels when the selection goes out of the canvas bounds
This commit is contained in:
parent
563edced5e
commit
0dca8aba0e
2 changed files with 2 additions and 2 deletions
|
@ -90,9 +90,9 @@ func lasso_selection(
|
|||
var selection_size := selection_map.get_size()
|
||||
var bounding_rect := Rect2i(points[0], Vector2i.ZERO)
|
||||
for point in points:
|
||||
bounding_rect = bounding_rect.expand(point)
|
||||
if point.x < 0 or point.y < 0 or point.x >= selection_size.x or point.y >= selection_size.y:
|
||||
continue
|
||||
bounding_rect = bounding_rect.expand(point)
|
||||
if _intersect:
|
||||
if previous_selection_map.is_pixel_selected(point):
|
||||
select_pixel(point, project, true)
|
||||
|
|
|
@ -133,9 +133,9 @@ func lasso_selection(
|
|||
var selection_size := selection_map.get_size()
|
||||
var bounding_rect := Rect2i(points[0], Vector2i.ZERO)
|
||||
for point in points:
|
||||
bounding_rect = bounding_rect.expand(point)
|
||||
if point.x < 0 or point.y < 0 or point.x >= selection_size.x or point.y >= selection_size.y:
|
||||
continue
|
||||
bounding_rect = bounding_rect.expand(point)
|
||||
if _intersect:
|
||||
if previous_selection_map.is_pixel_selected(point):
|
||||
select_pixel(point, project, true)
|
||||
|
|
Loading…
Add table
Reference in a new issue