DrawRectangleRoundedLinesEx function added (fixes #435)

This commit is contained in:
JupiterRider 2024-11-23 21:24:30 +01:00
parent c364e5b3f5
commit 24c48cde91
2 changed files with 20 additions and 3 deletions

View file

@ -294,7 +294,7 @@ func DrawRectangleRounded(rec Rectangle, roundness float32, segments int32, col
}
// DrawRectangleRoundedLines - Draw rectangle lines with rounded edges
func DrawRectangleRoundedLines(rec Rectangle, roundness float32, segments, col color.RGBA) {
func DrawRectangleRoundedLines(rec Rectangle, roundness float32, segments int32, col color.RGBA) {
crec := rec.cptr()
croundness := (C.float)(roundness)
csegments := (C.int)(segments)
@ -302,6 +302,16 @@ func DrawRectangleRoundedLines(rec Rectangle, roundness float32, segments, col c
C.DrawRectangleRoundedLines(*crec, croundness, csegments, *ccolor)
}
// DrawRectangleRoundedLinesEx - Draw rectangle with rounded edges outline
func DrawRectangleRoundedLinesEx(rec Rectangle, roundness float32, segments int32, lineThick float32, col color.RGBA) {
crec := rec.cptr()
croundness := (C.float)(roundness)
csegments := (C.int)(segments)
clineThick := (C.float)(lineThick)
ccolor := colorCptr(col)
C.DrawRectangleRoundedLinesEx(*crec, croundness, csegments, clineThick, *ccolor)
}
// DrawTriangle - Draw a color-filled triangle
func DrawTriangle(v1, v2, v3 Vector2, col color.RGBA) {
cv1 := v1.cptr()