al_draw_rectangle
void al_draw_rectangle(float x1, float y1, float x2, float y2,
ALLEGRO_COLOR color, float thickness)
Introduced in 5.0.0
Draws an outlined rectangle.
Parameters:
- x1, y1, x2, y2 - Upper left and lower right points of the rectangle
- color - Color of the rectangle
- thickness - Thickness of the lines, pass
<= 0to draw hairline lines
See also: al_draw_filled_rectangle, al_draw_rounded_rectangle
Examples: ex_draw, ex_font_justify, ex_joystick_events, ex_lines, ex_mouse, ex_mouse_events, ex_prim, ex_subbitmap, ex_ttf
Most helpful discussions:
- [A5] al_draw_rectangle bug? rectangle is drawn by 1 pixel off. (1)
- Drawing a coloured Rectangle? (1)
- What is the error in following little program
- Why some Shaders don't work !
- Mixing Allegro 5 with OPENGL
- upgrading tank war codebase to allegro 5
- How to make a bitmap blink?
- Keyboard Interrupting on Mouse Positions?
- [a5] al_create_bitmap() not creating mipmap in OPENGL
- Using ALLEGRO_DISPLAY_CLOSE multiple times
Other recent discussions:
- Keyboard input trought allegro
- Can't display infinity symbol
- How to reset keystate Allegro5?
- More efficient way to capture mouse position?
- Choppy graphics
- [A5] Object Oriented Programming -Confusing.
- Drawing to display in class member functions not working
- Loop ran out of time from drawing
- Game slow down from drawing player
- al_draw_filled_rectangle v. slow compared to al_draw_filled_rectangle