rasterize

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 2 Imported by: 6

Documentation

Overview

Package rasterize provides different functions for several use cases to rasterize a triangle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DDAPolygon added in v1.1.7

func DDAPolygon(polygon geom.Polygon, pixel func(x, y int))

func DDAPolygonBlocks added in v1.1.9

func DDAPolygonBlocks(polygon geom.Polygon, blockSize int, line func(x0, x1, y int), block func(x, y int))

func DDATriangle

func DDATriangle(triangle geom.Triangle, pixel func(x, y int))

DDATriangle calls function pixel for each pixel a geom.Triangle covers.

func DDATriangleBlocks

func DDATriangleBlocks(triangle geom.Triangle, blockSize int, line func(x0, x1, y int), block func(x, y int))

DDATriangleBlocks calls function line for each line a triangle covers, and calls function block for each block the triangle covers.

func DDATriangleLines

func DDATriangleLines(triangle geom.Triangle, line func(x0, x1, y int))

DDATriangleLines calls function line for each horizontal line a geom.Triangle covers using a digital differential analyzing algorithm.

Types

This section is empty.

Jump to

Keyboard shortcuts

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