scene

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Unlicense, MIT, Unlicense Imports: 5 Imported by: 0

Documentation

Overview

Package scene encodes and decodes graphics commands in the format used by the compute renderer.

Index

Constants

View Source
const (
	FillModeNonzero = 0
	FillModeStroke  = 1
)
View Source
const CommandSize = int(unsafe.Sizeof(Command{}))

Variables

This section is empty.

Functions

func DecodeCubic

func DecodeCubic(cmd Command) (from, ctrl0, ctrl1, to f32.Point)

func DecodeLine

func DecodeLine(cmd Command) (from, to f32.Point)

func DecodeQuad

func DecodeQuad(cmd Command) (from, ctrl, to f32.Point)

Types

type Command

type Command [sceneElemSize / 4]uint32

func BeginClip

func BeginClip(bbox f32.Rectangle) Command

func Cubic

func Cubic(start, ctrl0, ctrl1, end f32.Point) Command

func EndClip

func EndClip(bbox f32.Rectangle) Command

func FillColor

func FillColor(col color.RGBA) Command

func FillImage

func FillImage(index int) Command

func Line

func Line(start, end f32.Point) Command

func Quad

func Quad(start, ctrl, end f32.Point) Command

func SetFillMode

func SetFillMode(mode FillMode) Command

func SetLineWidth

func SetLineWidth(width float32) Command

func Transform

func Transform(m f32.Affine2D) Command

func (Command) Op

func (c Command) Op() Op

func (Command) String

func (c Command) String() string

type FillMode

type FillMode uint32

FillModes, from setup.h.

type Op

type Op uint32
const (
	OpNop Op = iota
	OpLine
	OpQuad
	OpCubic
	OpFillColor
	OpLineWidth
	OpTransform
	OpBeginClip
	OpEndClip
	OpFillImage
	OpSetFillMode
)

GPU commands from scene.h

Jump to

Keyboard shortcuts

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