line

package module
v0.0.0-...-5bfe2f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

line

Package line implements standard line drawing algorithms.

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL