From afb72fa594babcaf421d99ac9a9ecb60ebf35294 Mon Sep 17 00:00:00 2001 From: xzebra Date: Sat, 6 Feb 2021 01:12:57 +0100 Subject: [PATCH] lined polygon function --- raylib/shapes.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/raylib/shapes.go b/raylib/shapes.go index cf3dc12..d007617 100644 --- a/raylib/shapes.go +++ b/raylib/shapes.go @@ -307,6 +307,16 @@ func DrawPoly(center Vector2, sides int32, radius, rotation float32, color Color C.DrawPoly(*ccenter, csides, cradius, crotation, *ccolor) } +// DrawPolyLines - Draw a polygon outline of n sides +func DrawPolyLines(center Vector2, sides int32, radius, rotation float32, color Color) { + ccenter := center.cptr() + csides := (C.int)(sides) + cradius := (C.float)(radius) + crotation := (C.float)(rotation) + ccolor := color.cptr() + C.DrawPolyLines(*ccenter, csides, cradius, crotation, *ccolor) +} + // CheckCollisionRecs - Check collision between two rectangles func CheckCollisionRecs(rec1, rec2 Rectangle) bool { crec1 := rec1.cptr()