lined polygon function

This commit is contained in:
xzebra 2021-02-06 01:12:57 +01:00
parent 1b2825bc0c
commit afb72fa594
No known key found for this signature in database
GPG key ID: 6C835ADAF247138C

View file

@ -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()