Skip to content

Commit

Permalink
Fix ellipse tool producing gaps with large sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadedOrama committed Nov 6, 2023
1 parent ac6a4db commit 4f3a7a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Tools/EllipseTool.gd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func _get_shape_points(size: Vector2) -> PoolVector2Array:

var size_offset := Vector2.ONE * (_thickness - 1)
var new_size := size + size_offset
var inner_ellipse_size := new_size - size_offset
var inner_ellipse_size := new_size - 2 * size_offset

# The inner ellipse is to small to create a gap in the middle of the ellipse,
# just return a filled ellipse
Expand All @@ -31,9 +31,9 @@ func _get_shape_points(size: Vector2) -> PoolVector2Array:
var scan_dir := Vector2(0, 1) if smallest_side == new_size.x else Vector2(1, 0)
var iscan_dir := Vector2(1, 0) if smallest_side == new_size.x else Vector2(0, 1)
var ie_relevant_offset_side = size_offset.x if smallest_side == new_size.x else size_offset.y
var h_ls_c := ceil(largest_side / 2)
var h_ls_c := ceil(largest_side / 2.0)

for s in range(ceil(smallest_side / 2)):
for s in range(ceil(smallest_side / 2.0)):
if s <= ie_relevant_offset_side:
var draw := false
for l in range(h_ls_c):
Expand Down

0 comments on commit 4f3a7a3

Please sign in to comment.