canvas

package
v0.51.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoCanvas = errors.New("no canvas metadata available")

Functions

func AttachToThread

func AttachToThread(t *starlark.Thread, m Metadata)

Types

type Metadata

type Metadata struct {
	Width  int  `json:"width"`
	Height int  `json:"height"`
	Is2x   bool `json:"is2x"`
}

func FromThread

func FromThread(thread *starlark.Thread) (Metadata, error)

func (Metadata) ScaledHeight

func (c Metadata) ScaledHeight() int

func (Metadata) ScaledWidth

func (c Metadata) ScaledWidth() int

Jump to

Keyboard shortcuts

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