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. |
Octant |
A simple octant struct for transforming line points |
Supercover |
Like |
WalkGrid |
Walk along a grid, taking only orthogonal steps. |
XiaolinWu |
An implementation of Xiaolin Wu's line algorithm. |
Functions
bresenham |
A simple wrapper around |
bresenham_sorted |
Like |
midpoint |
A convenience function to collect the points from |
midpoint_sorted |
Like |
supercover |
A convenience function to collect the points from |
walk_grid |
A convenience function to collect the points from |
walk_grid_sorted |
Like |
xiaolin_wu |
A convenience function to collect the points from |
xiaolin_wu_sorted |
Like |
Type Definitions
Point |
A point in 2D space |