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
<= 0to 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:
- Line Drawing with OpenGL
- What is the error in following little program
- Drawing text slows down FPS dramatically
- [A5] Show & Hide window/display Cross-Platform ?
- Why some Shaders don't work !
- Complications when drawing FPS
- Coordinate systems
- Looking for astrology example program
- [a5] al_create_bitmap() not creating mipmap in OPENGL
- al_draw_soft_line
Other recent discussions:
- Big FPS problem
- How to get raw sample frequencies
- Problem with al_draw_filled_circle()
- [a5] Multisampling not working in Direct3D
- Choppy graphics
- Al_save_bitmap only saves a blank png
- Drawing to display in class member functions not working
- Drawing line frame by frame
- [A5] New Line
- Having problems dont know what causes it.