class SFML::ConvexShape

An arbitrary convex polygon. Define its outline by listing points in order (clockwise or counter-clockwise β€” just stay consistent). The shape must remain convex β€” drawing a non-convex point set produces visual artifacts (CSFML doesn’t validate).

star = SFML::ConvexShape.new( points: [[60, 0], [80, 40], [120, 50], [90, 80], [100, 120], [60, 95], [20, 120], [30, 80], [0, 50], [40, 40]], fill_color: SFML::Color.yellow, ) window.draw(star)