diff --git a/raylib/raylib_purego.go b/raylib/raylib_purego.go index 2406932..7e7a5a4 100644 --- a/raylib/raylib_purego.go +++ b/raylib/raylib_purego.go @@ -221,6 +221,7 @@ var drawRectangleLines func(posX int32, posY int32, width int32, height int32, c var drawRectangleLinesEx func(rec uintptr, lineThick float32, col uintptr) var drawRectangleRounded func(rec uintptr, roundness float32, segments int32, col uintptr) var drawRectangleRoundedLines func(rec uintptr, roundness float32, segments int32, col uintptr) +var drawRectangleRoundedLinesEx func(rec uintptr, roundness float32, segments int32, lineThick float32, col uintptr) var drawTriangle func(v1 uintptr, v2 uintptr, v3 uintptr, col uintptr) var drawTriangleLines func(v1 uintptr, v2 uintptr, v3 uintptr, col uintptr) var drawTriangleFan func(points *Vector2, pointCount int32, col uintptr) @@ -724,6 +725,7 @@ func init() { purego.RegisterLibFunc(&drawRectangleLinesEx, raylibDll, "DrawRectangleLinesEx") purego.RegisterLibFunc(&drawRectangleRounded, raylibDll, "DrawRectangleRounded") purego.RegisterLibFunc(&drawRectangleRoundedLines, raylibDll, "DrawRectangleRoundedLines") + purego.RegisterLibFunc(&drawRectangleRoundedLinesEx, raylibDll, "DrawRectangleRoundedLinesEx") purego.RegisterLibFunc(&drawTriangle, raylibDll, "DrawTriangle") purego.RegisterLibFunc(&drawTriangleLines, raylibDll, "DrawTriangleLines") purego.RegisterLibFunc(&drawTriangleFan, raylibDll, "DrawTriangleFan") @@ -2135,8 +2137,13 @@ func DrawRectangleRounded(rec Rectangle, roundness float32, segments int32, col } // DrawRectangleRoundedLines - Draw rectangle lines with rounded edges -func DrawRectangleRoundedLines(rec Rectangle, roundness float32, segments float32, col color.RGBA) { - drawRectangleRoundedLines(uintptr(unsafe.Pointer(&rec)), roundness, int32(segments), *(*uintptr)(unsafe.Pointer(&col))) +func DrawRectangleRoundedLines(rec Rectangle, roundness float32, segments int32, col color.RGBA) { + drawRectangleRoundedLines(uintptr(unsafe.Pointer(&rec)), roundness, segments, *(*uintptr)(unsafe.Pointer(&col))) +} + +// DrawRectangleRoundedLinesEx - Draw rectangle with rounded edges outline +func DrawRectangleRoundedLinesEx(rec Rectangle, roundness float32, segments int32, lineThick float32, col color.RGBA) { + drawRectangleRoundedLinesEx(uintptr(unsafe.Pointer(&rec)), roundness, segments, lineThick, *(*uintptr)(unsafe.Pointer(&col))) } // DrawTriangle - Draw a color-filled triangle (vertex in counter-clockwise order!) diff --git a/raylib/rshapes.go b/raylib/rshapes.go index b3ee497..ff95c37 100644 --- a/raylib/rshapes.go +++ b/raylib/rshapes.go @@ -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()