bresenham

package
v0.0.0-...-78dfd9e Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bresenham

func Bresenham(img draw.Image, x1, y1, x2, y2 int, col color.Color)

Generalized with integer

func BresenhamDxXRYD

func BresenhamDxXRYD(img draw.Image, x1, y1, x2, y2 int, col color.Color)

dx > dy; x1 < x2; y1 < y2

func BresenhamDxXRYU

func BresenhamDxXRYU(img draw.Image, x1, y1, x2, y2 int, col color.Color)

dx > dy; x1 < x2; y1 > y2

func BresenhamDyXRYD

func BresenhamDyXRYD(img draw.Image, x1, y1, x2, y2 int, col color.Color)

dy > dx; x1 < x2; y1 < y2

func BresenhamDyXRYU

func BresenhamDyXRYU(img draw.Image, x1, y1, x2, y2 int, col color.Color)

func Bresenham_1

func Bresenham_1(img draw.Image, x1, y1, x2, y2 int, col color.Color)

Floating point

func Bresenham_2

func Bresenham_2(img draw.Image, x1, y1, x2, y2 int, col color.Color)

Floating point with error accumulator

func Bresenham_3

func Bresenham_3(img draw.Image, x1, y1, x2, y2 int, col color.Color)

Integer float -> float * dx -> integer

func Bresenham_4

func Bresenham_4(img draw.Image, x1, y1, x2, y2 int, col color.Color)

Integer; remove comparison (cmp -> bit test); remove variables; float -> float * 2 * dx -> integer

Types

This section is empty.

Jump to

Keyboard shortcuts

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