graphicsutil

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyImage

func CopyImage(img image.Image) []byte

CopyImage copies img to a new RGBA image.

Basically CopyImage just calls draw.Draw. If img is a paletted image, an optimized copying method is used.

CopyImage is used only internally but it is exposed for testing.

func MipmapLevel added in v1.8.0

func MipmapLevel(det float32) int

MipmapLevel returns an appropriate mipmap level for the given determinant of a geometry matrix.

MipmapLevel returns -1 if det is 0.

MipmapLevel panics if det is NaN.

func QuadIndices added in v1.8.0

func QuadIndices() []uint16

func QuadVertices added in v1.8.0

func QuadVertices(width, height int, sx0, sy0, sx1, sy1 int, a, b, c, d, tx, ty float32, cr, cg, cb, ca float32) []float32

func Vertex added in v1.8.0

func Vertex(width, height int, dx, dy, sx, sy float32, cr, cg, cb, ca float32) []float32

Types

This section is empty.

Jump to

Keyboard shortcuts

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