1
0
Fork 0

feat(render): adding DrawRectOutlineBorder()

This commit is contained in:
Henrik Hautakoski 2025-10-27 20:15:05 +01:00
parent 3d3e8d7a44
commit d407eaad8b

View file

@ -17,10 +17,15 @@ func DrawRectBorder(rect rl.RectangleInt32, col color.RGBA, border_size int32, b
Height: float32(rect.Height),
}, col)
rl.DrawRectangleLinesEx(rl.Rectangle{
X: float32(rect.X - border_size),
Y: float32(rect.Y - border_size),
Width: float32(rect.Width + (border_size * 2)),
Height: float32(rect.Height + (border_size * 2)),
}, float32(border_size), border_col)
DrawRectOutlineBorder(rect, border_size, border_col)
}
// DrawRectOutlineBorder draws a border (outer) around the rectangle.
func DrawRectOutlineBorder(rect rl.RectangleInt32, size int32, col color.RGBA) {
rl.DrawRectangleLinesEx(rl.Rectangle{
X: float32(rect.X - size),
Y: float32(rect.Y - size),
Width: float32(rect.Width + (size * 2)),
Height: float32(rect.Height + (size * 2)),
}, float32(size), col)
}