Skip to content

Commit

Permalink
Fix supplied polygon point count to prevent Graphics.fillPolygon() ar…
Browse files Browse the repository at this point in the history
…tifacting (#57)
  • Loading branch information
tyetrask authored Jun 20, 2024
1 parent 3707027 commit 25f3601
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/PlaydateKit/Core/Graphics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ public enum Graphics {
) {
color.withLCDColor {
var points = polygon.vertices.flatMap { [$0.x, $0.y] }
graphics.fillPolygon.unsafelyUnwrapped(CInt(points.count), &points, $0, fillRule)
graphics.fillPolygon.unsafelyUnwrapped(CInt(points.count / 2), &points, $0, fillRule)
}
}

Expand Down

0 comments on commit 25f3601

Please sign in to comment.