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
<= 0
to 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)
- Allegro5 and OpenGL. Problem with drawing Allegro primitives
- Crasehs when use primitive functions
- Question about al_clear_to_color
- Transforming
- Allegro 5 Android high CPU usage
- Purple Martians update
- Shader Puzzle aka Reverse Engineering cool effect
- Need help with input_feild();
Other recent discussions:
- Install Allegro 5.2.4.1 on Win10
- Text input using allegro 5
- Drawing antialiased primitives to bitmaps?
- Sliding Collision
- 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?