18 lines
604 B
Go
18 lines
604 B
Go
package allegro5
|
|
|
|
// #include <allegro5/allegro.h>
|
|
// #include <allegro5/allegro_primitives.h>
|
|
import "C"
|
|
|
|
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))
|
|
}
|
|
|
|
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)
|
|
}
|