mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Fix ellipse tool producing gaps with large sizes
This commit is contained in:
parent
ac6a4db43d
commit
4f3a7a305a
|
@ -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
|
||||
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue