Documentation ¶
Index ¶
- Constants
- func CopyImage(img image.Image) []byte
- func InternalImageSize(x int) int
- func MipmapLevel(det float32) int
- func QuadIndices() []uint16
- func QuadVertices(width, height int, sx0, sy0, sx1, sy1 int, a, b, c, d, tx, ty float32, ...) []float32
- type Address
- type CompositeMode
- type Filter
- type Operation
Constants ¶
View Source
const ( IndicesNum = (1 << 16) / 3 * 3 // Adjust num for triangles. VertexFloatNum = 12 )
View Source
const TexelAdjustmentFactor = 512.0
Variables ¶
This section is empty.
Functions ¶
func CopyImage ¶ added in v1.5.0
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 InternalImageSize ¶ added in v1.9.0
InternalImageSize returns a nearest appropriate size as an internal image.
func MipmapLevel ¶ added in v1.9.0
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.9.0
func QuadIndices() []uint16
Types ¶
type CompositeMode ¶ added in v1.9.0
type CompositeMode int
const ( CompositeModeSourceOver CompositeMode = iota // This value must be 0 (= initial value) CompositeModeClear CompositeModeCopy CompositeModeDestination CompositeModeDestinationOver CompositeModeSourceIn CompositeModeDestinationIn CompositeModeSourceOut CompositeModeDestinationOut CompositeModeSourceAtop CompositeModeDestinationAtop CompositeModeXor CompositeModeLighter CompositeModeUnknown CompositeModeMax = CompositeModeLighter )
func (CompositeMode) Operations ¶ added in v1.9.0
func (c CompositeMode) Operations() (src Operation, dst Operation)
Click to show internal directories.
Click to hide internal directories.