tag

package
v0.0.0-...-cb98339 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseDrawingTag

type BaseDrawingTag shapes.Shape

func (*BaseDrawingTag) AsShape

func (b *BaseDrawingTag) AsShape() shapes.Shape

func (*BaseDrawingTag) GetCommands

func (b *BaseDrawingTag) GetCommands(scale, precision int) string

type BlurGaussianTag

type BlurGaussianTag struct {
	Blur float64
}

func (*BlurGaussianTag) Encode

func (t *BlurGaussianTag) Encode(event time.EventTime) string

func (*BlurGaussianTag) Equals

func (t *BlurGaussianTag) Equals(tag Tag) bool

func (*BlurGaussianTag) FromStyleRecord

func (t *BlurGaussianTag) FromStyleRecord(record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

func (*BlurGaussianTag) TransitionStyleRecord

func (t *BlurGaussianTag) TransitionStyleRecord(event Event, record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

type BlurTag

type BlurTag struct {
	Blur int64
}

func (*BlurTag) Encode

func (t *BlurTag) Encode(event time.EventTime) string

func (*BlurTag) Equals

func (t *BlurTag) Equals(tag Tag) bool

func (*BlurTag) FromStyleRecord

func (t *BlurTag) FromStyleRecord(record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

func (*BlurTag) TransitionStyleRecord

func (t *BlurTag) TransitionStyleRecord(event Event, record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

type BorderTag

type BorderTag struct {
	Size math.Vector2[float64]
}

func (*BorderTag) Encode

func (t *BorderTag) Encode(event time.EventTime) string

func (*BorderTag) Equals

func (t *BorderTag) Equals(tag Tag) bool

func (*BorderTag) FromStyleRecord

func (t *BorderTag) FromStyleRecord(record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

func (*BorderTag) TransitionStyleRecord

func (t *BorderTag) TransitionStyleRecord(event Event, record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

type ClipPathTag

type ClipPathTag interface {
	Tag
	TransitionClipPath(event Event, clip *shapes.ClipPath) ClipPathTag
}

type ClipTag

type ClipTag struct {
	BaseDrawingTag
	Scale  int
	IsNull bool
}

func NewClipTag

func NewClipTag(clip types.Option[shapes.Shape], scale int) *ClipTag

func (*ClipTag) ApplyMatrixTransform

func (t *ClipTag) ApplyMatrixTransform(transform math.MatrixTransform, applyTranslation bool) DrawingTag

func (*ClipTag) Encode

func (t *ClipTag) Encode(event time.EventTime) string

func (*ClipTag) Equals

func (t *ClipTag) Equals(tag Tag) bool

func (*ClipTag) TransitionClipPath

func (t *ClipTag) TransitionClipPath(event Event, clip *shapes.ClipPath) ClipPathTag

type ColorTag

type ColorTag interface {
	StyleTag
	ApplyColorTransform(transform math.ColorTransform) ColorTag
	TransitionColor(event Event, transform math.ColorTransform) ColorTag
	HasColor() bool
}

type ContainerTag

type ContainerTag struct {
	Tags        []Tag
	Transitions map[int64][]Tag

	BakedTransform types.Option[math.MatrixTransform]
}

func ContainerTagFromPathEntry

func ContainerTagFromPathEntry(path shapes.DrawPath, clip types.Option[shapes.ClipPath], colorTransform math.ColorTransform, matrixTransform math.MatrixTransform, bakeMatrixTransforms bool) *ContainerTag

func (*ContainerTag) ApplyColorTransform

func (t *ContainerTag) ApplyColorTransform(transform math.ColorTransform) ColorTag

func (*ContainerTag) Clone

func (t *ContainerTag) Clone(cloneTags bool) *ContainerTag

func (*ContainerTag) Encode

func (t *ContainerTag) Encode(event time.EventTime) string

func (*ContainerTag) Equals

func (t *ContainerTag) Equals(tag Tag) bool

func (*ContainerTag) FromMatrixTransform

func (t *ContainerTag) FromMatrixTransform(transform math.MatrixTransform) PositioningTag

func (*ContainerTag) FromStyleRecord

func (t *ContainerTag) FromStyleRecord(record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

func (*ContainerTag) HasColor

func (t *ContainerTag) HasColor() bool

func (*ContainerTag) TransitionClipPath

func (t *ContainerTag) TransitionClipPath(event Event, clip *shapes.ClipPath) ClipPathTag

func (*ContainerTag) TransitionColor

func (t *ContainerTag) TransitionColor(event Event, transform math.ColorTransform) ColorTag

func (*ContainerTag) TransitionMatrixTransform

func (t *ContainerTag) TransitionMatrixTransform(event Event, transform math.MatrixTransform) PositioningTag

func (*ContainerTag) TransitionShape

func (t *ContainerTag) TransitionShape(event Event, shape shapes.Shape) PathTag

func (*ContainerTag) TransitionStyleRecord

func (t *ContainerTag) TransitionStyleRecord(event Event, record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

func (*ContainerTag) TryAppend

func (t *ContainerTag) TryAppend(tag Tag)

type DrawTag

type DrawTag struct {
	BaseDrawingTag
	Scale int
}

func NewDrawTag

func NewDrawTag(shape shapes.Shape, scale int) *DrawTag

func (*DrawTag) ApplyMatrixTransform

func (t *DrawTag) ApplyMatrixTransform(transform math.MatrixTransform, applyTranslation bool) DrawingTag

func (*DrawTag) Encode

func (t *DrawTag) Encode(event time.EventTime) string

func (*DrawTag) Equals

func (t *DrawTag) Equals(tag Tag) bool

func (*DrawTag) TransitionShape

func (t *DrawTag) TransitionShape(event Event, shape shapes.Shape) PathTag

type DrawingTag

type DrawingTag interface {
	Tag
	ApplyMatrixTransform(transform math.MatrixTransform, applyTranslation bool) DrawingTag
	AsShape() shapes.Shape
	GetCommands(scale, precision int) string
}

type Event

type Event interface {
	GetStart() int64
	GetEnd() int64
}

type FillColorTag

type FillColorTag struct {
	Color         *math.Color
	OriginalColor *math.Color
}

func (*FillColorTag) ApplyColorTransform

func (t *FillColorTag) ApplyColorTransform(transform math.ColorTransform) ColorTag

func (*FillColorTag) Encode

func (t *FillColorTag) Encode(event time.EventTime) string

func (*FillColorTag) Equals

func (t *FillColorTag) Equals(tag Tag) bool

func (*FillColorTag) FromStyleRecord

func (t *FillColorTag) FromStyleRecord(record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

func (*FillColorTag) HasColor

func (t *FillColorTag) HasColor() bool

func (*FillColorTag) TransitionColor

func (t *FillColorTag) TransitionColor(event Event, transform math.ColorTransform) ColorTag

func (*FillColorTag) TransitionStyleRecord

func (t *FillColorTag) TransitionStyleRecord(event Event, record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

type LineColorTag

type LineColorTag struct {
	Color         *math.Color
	OriginalColor *math.Color
}

func (*LineColorTag) ApplyColorTransform

func (t *LineColorTag) ApplyColorTransform(transform math.ColorTransform) ColorTag

func (*LineColorTag) Encode

func (t *LineColorTag) Encode(event time.EventTime) string

func (*LineColorTag) Equals

func (t *LineColorTag) Equals(tag Tag) bool

func (*LineColorTag) FromStyleRecord

func (t *LineColorTag) FromStyleRecord(record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

func (*LineColorTag) HasColor

func (t *LineColorTag) HasColor() bool

func (*LineColorTag) TransitionColor

func (t *LineColorTag) TransitionColor(event Event, transform math.ColorTransform) ColorTag

func (*LineColorTag) TransitionStyleRecord

func (t *LineColorTag) TransitionStyleRecord(event Event, record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

type MatrixTransformTag

type MatrixTransformTag struct {
	Scale    ScaleTag
	Rotation RotationTag
	Shearing ShearingTag

	Transform math2.MatrixTransform
}

func MatrixTransformTagFromTransformStable

func MatrixTransformTagFromTransformStable(transform math2.MatrixTransform) *MatrixTransformTag

MatrixTransformTagFromTransformStable Finds matching ASS \fscx, \fscy, \frx, \fry, \frz, \fax, \fay for a given math.MatrixTransform Numerically stable implementation by MrSmile

func MatrixTransformTagFromTransformUnstable

func MatrixTransformTagFromTransformUnstable(transform math2.MatrixTransform) *MatrixTransformTag

MatrixTransformTagFromTransformUnstable Finds matching ASS \fscx, \fscy, \frx, \fry, \frz, \fax, \fay for a given math.MatrixTransform Numerically unstable implementation by Oneric

func NewMatrixTransformTag

func NewMatrixTransformTag(transform math2.MatrixTransform, scale math2.Vector2[float64], rotationX, rotationY, rotationZ float64, shear math2.Vector2[float64]) *MatrixTransformTag

func (*MatrixTransformTag) Encode

func (t *MatrixTransformTag) Encode(event time.EventTime) string

func (*MatrixTransformTag) Equals

func (t *MatrixTransformTag) Equals(tag Tag) bool

func (*MatrixTransformTag) FromMatrixTransform

func (t *MatrixTransformTag) FromMatrixTransform(transform math2.MatrixTransform) PositioningTag

func (*MatrixTransformTag) TransitionMatrixTransform

func (t *MatrixTransformTag) TransitionMatrixTransform(event Event, transform math2.MatrixTransform) PositioningTag

type PathTag

type PathTag interface {
	Tag
	TransitionShape(event Event, shape shapes.Shape) PathTag
}

type PositionTag

type PositionTag struct {
	From, To   math2.Vector2[float64]
	Start, End int64
}

func (*PositionTag) Encode

func (t *PositionTag) Encode(event time.EventTime) string

func (*PositionTag) Equals

func (t *PositionTag) Equals(tag Tag) bool

func (*PositionTag) FromMatrixTransform

func (t *PositionTag) FromMatrixTransform(transform math2.MatrixTransform) PositioningTag

func (*PositionTag) TransitionMatrixTransform

func (t *PositionTag) TransitionMatrixTransform(event Event, transform math2.MatrixTransform) PositioningTag

type PositioningTag

type PositioningTag interface {
	Tag
	TransitionMatrixTransform(event Event, transform math.MatrixTransform) PositioningTag
	FromMatrixTransform(transform math.MatrixTransform) PositioningTag
}

type RotationTag

type RotationTag struct {
	RotationX, RotationY, RotationZ float64
}

func (*RotationTag) Encode

func (t *RotationTag) Encode(event time.EventTime) string

func (*RotationTag) Equals

func (t *RotationTag) Equals(tag Tag) bool

func (*RotationTag) FromMatrixTransform

func (t *RotationTag) FromMatrixTransform(transform math2.MatrixTransform) PositioningTag

func (*RotationTag) TransitionMatrixTransform

func (t *RotationTag) TransitionMatrixTransform(event Event, transform math2.MatrixTransform) PositioningTag

type ScaleTag

type ScaleTag struct {
	Scale math.Vector2[float64]
}

func (*ScaleTag) Encode

func (t *ScaleTag) Encode(event time.EventTime) string

func (*ScaleTag) Equals

func (t *ScaleTag) Equals(tag Tag) bool

func (*ScaleTag) FromMatrixTransform

func (t *ScaleTag) FromMatrixTransform(transform math.MatrixTransform) PositioningTag

func (*ScaleTag) TransitionMatrixTransform

func (t *ScaleTag) TransitionMatrixTransform(event Event, transform math.MatrixTransform) PositioningTag

type ShadowTag

type ShadowTag struct {
	Depth float64
}

func (*ShadowTag) Encode

func (t *ShadowTag) Encode(event time.EventTime) string

func (*ShadowTag) Equals

func (t *ShadowTag) Equals(tag Tag) bool

func (*ShadowTag) FromStyleRecord

func (t *ShadowTag) FromStyleRecord(record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

func (*ShadowTag) TransitionStyleRecord

func (t *ShadowTag) TransitionStyleRecord(event Event, record shapes.StyleRecord, transform math.MatrixTransform) StyleTag

type ShearingTag

type ShearingTag struct {
	Shear math.Vector2[float64]
}

func (*ShearingTag) Encode

func (t *ShearingTag) Encode(event time.EventTime) string

func (*ShearingTag) Equals

func (t *ShearingTag) Equals(tag Tag) bool

func (*ShearingTag) FromMatrixTransform

func (t *ShearingTag) FromMatrixTransform(transform math.MatrixTransform) PositioningTag

func (*ShearingTag) TransitionMatrixTransform

func (t *ShearingTag) TransitionMatrixTransform(event Event, transform math.MatrixTransform) PositioningTag

type StyleTag

type StyleTag interface {
	Tag
	TransitionStyleRecord(event Event, record shapes.StyleRecord, transform math.MatrixTransform) StyleTag
	FromStyleRecord(record shapes.StyleRecord, transform math.MatrixTransform) StyleTag
}

type Tag

type Tag interface {
	Equals(tag Tag) bool
	Encode(event time.EventTime) string
}

Jump to

Keyboard shortcuts

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