al_draw_line
void al_draw_line(float x1, float y1, float x2, float y2,
ALLEGRO_COLOR color, float thickness)
Introduced in 5.0.0
Draws a line segment between two points.
Parameters:
- x1, y1, x2, y2 - Start and end points of the line
- color - Color of the line
- thickness - Thickness of the line, pass
<= 0
to draw hairline lines
See also: al_draw_soft_line
Examples: ex_blend_test, ex_draw, ex_font_justify, ex_fs_resize, ex_fs_window, ex_lines, ex_logo, ex_mixer_pp, ex_multisample, ex_pixelformat, ex_prim, ex_resize, ex_stream_seek, ex_ttf, ex_warp_mouse
Most helpful discussions:
- linking on ubuntu
- Vivace extra points. Its there a better way of doing this one.
- Allegro5 and OpenGL. Problem with drawing Allegro primitives
- why is my code failing
- ex_resize
- Allegro Access Violation while Drawing
- help: memory bitmap background image causing artifacts
- GUI Design and Implementation for Noobs
- 7Zip file of my game - Alien Cookbook
- Rendering modes for bitmaps?
Other recent discussions:
- Quick Question about MSAA
- Need help with structs
- Getting parameter problems.
- BITMAP quality gets reduced
- Did I skip something?
- Single-pixel precision issues with GTX 500 series
- Shader Puzzle aka Reverse Engineering cool effect
- Install Allegro 5.2.4.1 on Win10
- mouse y and line y not aligned when ALLEGRO_MENU displayted
- [Performance] Load a bitmap screen vs Draw a screen