internal

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TransformOperation

type TransformOperation struct {
	// contains filtered or unexported fields
}

TransformOperation is a single transformation operation.

type TransformOperationKind

type TransformOperationKind uint8

TransformOperationKind is the kind of a transformation operation.

const (
	// TransformScale scales the coordinate axes.
	TransformScale TransformOperationKind = iota
	// TransformRotate rotates the coordinate system.
	TransformRotate
	// TransformTranslate moves the origin of the coordinate system.
	TransformTranslate
)

type TransformationStack

type TransformationStack struct {
	// contains filtered or unexported fields
}

TransformationStack stores operations rather than transformed coordinates. Replaying them only when something is drawn avoids compounding rounding errors between drawing calls.

func NewTransformationStack

func NewTransformationStack() TransformationStack

NewTransformationStack creates a new TransformationStack.

func (*TransformationStack) Append

Append appends a transformation operation to the most recent layer.

func (*TransformationStack) EnsureInitialLayer

func (s *TransformationStack) EnsureInitialLayer()

EnsureInitialLayer ensures that the initial layer exists.

func (*TransformationStack) GeometryMatrix

func (s *TransformationStack) GeometryMatrix() ebiten.GeoM

GeometryMatrix returns the transformation matrix.

func (*TransformationStack) Pull

func (s *TransformationStack) Pull()

Pull removes the most recently pushed transformation layer.

func (*TransformationStack) Push

func (s *TransformationStack) Push()

Push adds transformation layer to the stack.

func (*TransformationStack) Rotate

func (s *TransformationStack) Rotate(angle float64)

Rotate rotates the coordinate system.

func (*TransformationStack) Scale

func (s *TransformationStack) Scale(x, y float64)

Scale scales the coordinate axes.

func (*TransformationStack) Translate

func (s *TransformationStack) Translate(x, y float64)

Translate moves the origin of the coordinate system.

Jump to

Keyboard shortcuts

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