renderer

package
v0.0.0-...-6f71fe9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	Image() draw.Image
	SetImage(draw.Image) Context
	NewImage() Context
	// Width of the image
	Width() int
	// Height of the image
	Height() int
	// Bounds of the image
	Bounds() util.Rectangle
	// Center coordinates of the Image
	Center() (float64, float64)
	// Gc draw2dimg.GraphicContext
	Gc() *draw2dimg.GraphicContext
	// Get returns a named user object, used in keeping state.
	// This is cleared at the start of each frame
	Get(string) any
	// Set allows for a user object to be stored for retrieval with Get().
	// This allows for storing information during a frame's rendering.
	// This is cleared at the start of each frame
	Set(string, any) Context
	// Remove removes a key from the user object storage
	Remove(k string) Context
	Create() error
	Close() error
	Reset() Context
	Draw(d Drawable)
	Filter(f graph.Filter) error
	FilterBounds(f graph.Filter, b image.Rectangle) error
	Map(m graph.Mapper) error
	MapBounds(m graph.Mapper, b image.Rectangle) error

	Rotate(angle float64) Context
	Translate(tx, ty float64) Context
	Scale(sx, sy float64) Context
}

func CloneContext

func CloneContext(ctx Context) Context

func NewContext

func NewContext(width, height int) Context

NewContext creates a new context. start,end are the frame range to cover, frameRate the frame rate of the track whilst duration is the total duration of the track in frames

type Drawable

type Drawable interface {
	Draw(ctx Context)
}

Jump to

Keyboard shortcuts

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