natiny.render.poly_outline

Lua
natiny.render.poly_outline(cx, cy, sides, radius [, rotation [, thickness]])

Draws a regular polygon outline on the currently bound render target, using the current drawing color set by natiny.render.set_color().

Parameters

Name Type Default Description
cx number Center X position
cy number Center Y position
sides integer Number of polygon sides
radius number Distance from the center to a vertex
rotation number 0.0 Rotation angle in degrees
thickness number 1.0 Outline thickness

Example

Lua
natiny.render.poly_outline(160, 120, 6, 60, 0.0, 2.0)

Notes

  • sides must be at least 3; smaller values draw nothing.
  • Lua defaults are rotation 0 degrees and thickness 1 pixel.