ebiten: github.com/hajimehoshi/ebiten/internal/graphics Index | Files

package graphics

import "github.com/hajimehoshi/ebiten/internal/graphics"

Index

Package Files

compositemode.go copy.go filter.go math.go mipmap.go vertices.go

Constants

const (
    IndicesNum     = (1 << 16) / 3 * 3 // Adjust num for triangles.
    VertexFloatNum = 12
)

func CopyImage Uses

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 InternalImageSize Uses

func InternalImageSize(x int) int

InternalImageSize returns a nearest appropriate size as an internal image.

func MipmapLevel Uses

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 PutQuadVertices Uses

func PutQuadVertices(dst []float32, putter VertexPutter, sx0, sy0, sx1, sy1 int, a, b, c, d, tx, ty float32, cr, cg, cb, ca float32)

func QuadIndices Uses

func QuadIndices() []uint16

type Address Uses

type Address int
const (
    AddressClampToZero Address = iota
    AddressRepeat
)

type CompositeMode Uses

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 Uses

func (c CompositeMode) Operations() (src Operation, dst Operation)

type Filter Uses

type Filter int
const (
    FilterDefault Filter = iota
    FilterNearest
    FilterLinear
    FilterScreen
)

type Operation Uses

type Operation int
const (
    Zero Operation = iota
    One
    SrcAlpha
    DstAlpha
    OneMinusSrcAlpha
    OneMinusDstAlpha
)

type VertexPutter Uses

type VertexPutter interface {
    PutVertex(dst []float32, dx, dy, sx, sy float32, bx0, by0, bx1, by1 float32, cr, cg, cb, ca float32)
}

Package graphics imports 5 packages (graph) and is imported by 15 packages. Updated 2019-06-24. Refresh now. Tools for package owners.