render

package
v0.0.0-...-bbf78bc Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CircleRender

func CircleRender(shape *geometry.Circle, paint Painter) image.Image

func PathRender

func PathRender(path geometry.Path, paint Painter, width float64) image.Image

PathRender renders a Path with a given Painter and width, using a divide-et impera in order to obtain close points

func PolygonRender

func PolygonRender(shape *geometry.Polygon, paint Painter) image.Image

func ShapeRender

func ShapeRender(shape geometry.Shape, paint Painter) image.Image

Types

type Painter

type Painter func(float64, int, int) color.Color

Painter is an interface for a function that recieves a set of coordinates and a factor value between 0 and 1 and returns a color

func ColorPainter

func ColorPainter(c color.Color) Painter

ColorPainter returns a Painter function that returns the linear interpolation between color.Transparent and the given color, based on the given factor

Jump to

Keyboard shortcuts

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