Added rectangle primitives
This commit is contained in:
parent
27eae9dc8b
commit
a24dc7ba30
@ -7,3 +7,11 @@ import "C"
|
|||||||
func DrawLine(x1, y1, x2, y2 float32, c Color, thickness float32) {
|
func DrawLine(x1, y1, x2, y2 float32, c Color, thickness float32) {
|
||||||
C.al_draw_line(C.float(x1), C.float(y1), C.float(x2), C.float(y2), c.color, C.float(thickness))
|
C.al_draw_line(C.float(x1), C.float(y1), C.float(x2), C.float(y2), c.color, C.float(thickness))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DrawRectangle(x1, y1, x2, y2 float32, c Color, thickness float32) {
|
||||||
|
C.al_draw_rectangle(C.float(x1), C.float(y1), C.float(x2), C.float(y2), c.color, C.float(thickness))
|
||||||
|
}
|
||||||
|
|
||||||
|
func DrawFilledRectangle(x1, y1, x2, y2 float32, c Color) {
|
||||||
|
C.al_draw_filled_rectangle(C.float(x1), C.float(y1), C.float(x2), C.float(y2), c.color)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user