Skip to content

Commit 12c6eb4

Browse files
committed
fix Rect2 Tesselation
1 parent 5567b04 commit 12c6eb4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/primitives/rectangles.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ end
548548

549549
function coordinates(rect::Rect2, nvertices=(2, 2))
550550
mini, maxi = extrema(rect)
551-
return [mini, Point(mini[1], maxi[2]), maxi, Point(maxi[1], mini[2])]
551+
xrange, yrange = LinRange.(mini, maxi, nvertices)
552+
return [Point(x, y) for y in yrange for x in xrange]
552553
end
553554

554555
function texturecoordinates(rect::Rect2, nvertices=(2, 2))

0 commit comments

Comments
 (0)