Crate line_drawing [−] [src]
A collection of line-drawing algorithms for use in graphics and video games.
Currently implemented:
bresenham
throughbresenham-rs
.- The mid-point line algorithm.
- Xiaolin Wu's line algorithm.
WalkGrid
andSupercover
implemented from this article by Red Blob Games.
Structs
Midpoint |
An implementation of the mid-point line drawing algorithm. |
Supercover |
Like |
WalkGrid |
Walk along a grid, taking only orthagonal steps. |
Functions
bresenham |
A simple wrapper around |
midpoint |
A convenience function to collect the points from |
sorted_bresenham |
Like |
sorted_midpoint |
Like |
sorted_walk_grid |
Like |
sorted_xiaolin_wu |
Like |
supercover |
A convenience function to collect the points from |
walk_grid |
A convenience function to collect the points from |
xiaolin_wu |
An implementation of Xiaolin Wu's line algorithm. |