From a24dc7ba3062eed005651917c360e06f497ee1df Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Mon, 23 Oct 2017 11:18:24 +0200 Subject: [PATCH] Added rectangle primitives --- allegro5/primitives.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/allegro5/primitives.go b/allegro5/primitives.go index 5c46f2b..51fe59a 100644 --- a/allegro5/primitives.go +++ b/allegro5/primitives.go @@ -7,3 +7,11 @@ 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) +}