Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bresenham ¶
func Bresenham(x0, y0, x1, y1 int, plot BresenhamPlotter)
Bresenham plots a line between the two points using Bresenham's line algorithm.
Types ¶
type BresenhamPlotter ¶
type BresenhamPlotter func(x, y, e int)
BresenhamPlotter is a function which takes in: an x coordinate, a y coordinate, and an error value for the current coordinate. The error value is associated with the distance between the ideal line and the center of the pixel at (x, y).
Click to show internal directories.
Click to hide internal directories.