feat(render): adding DrawRectOutlineBorder()
This commit is contained in:
parent
3d3e8d7a44
commit
d407eaad8b
1 changed files with 11 additions and 6 deletions
|
|
@ -17,10 +17,15 @@ func DrawRectBorder(rect rl.RectangleInt32, col color.RGBA, border_size int32, b
|
||||||
Height: float32(rect.Height),
|
Height: float32(rect.Height),
|
||||||
}, col)
|
}, col)
|
||||||
|
|
||||||
rl.DrawRectangleLinesEx(rl.Rectangle{
|
DrawRectOutlineBorder(rect, border_size, border_col)
|
||||||
X: float32(rect.X - border_size),
|
}
|
||||||
Y: float32(rect.Y - border_size),
|
|
||||||
Width: float32(rect.Width + (border_size * 2)),
|
// DrawRectOutlineBorder draws a border (outer) around the rectangle.
|
||||||
Height: float32(rect.Height + (border_size * 2)),
|
func DrawRectOutlineBorder(rect rl.RectangleInt32, size int32, col color.RGBA) {
|
||||||
}, float32(border_size), border_col)
|
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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue