rounded rectangle functions

This commit is contained in:
xzebra 2021-02-06 01:12:27 +01:00
parent 8448e4c97c
commit 7d41c2d3df
No known key found for this signature in database
GPG key ID: 6C835ADAF247138C

View file

@ -244,6 +244,25 @@ func DrawRectangleLinesEx(rec Rectangle, lineThick int32, color Color) {
C.DrawRectangleLinesEx(*crec, clineThick, *ccolor)
}
// DrawRectangleRounded - Draw rectangle with rounded edges
func DrawRectangleRounded(rec Rectangle, roundness float32, segments int32, color Color) {
crec := rec.cptr()
croundness := (C.float)(roundness)
csegments := (C.int)(segments)
ccolor := color.cptr()
C.DrawRectangleRounded(*crec, croundness, csegments, *ccolor)
}
// DrawRectangleRoundedLines - Draw rectangle with rounded edges outline
func DrawRectangleRoundedLines(rec Rectangle, roundness float32, segments, lineThick int32, color Color) {
crec := rec.cptr()
croundness := (C.float)(roundness)
csegments := (C.int)(segments)
clineThick := (C.int)(lineThick)
ccolor := color.cptr()
C.DrawRectangleRoundedLines(*crec, croundness, csegments, clineThick, *ccolor)
}
// DrawTriangle - Draw a color-filled triangle
func DrawTriangle(v1, v2, v3 Vector2, color Color) {
cv1 := v1.cptr()