Documentation

Index

Constants

View Source
const QuadSize = 4 * 2 * 3

Variables

This section is empty.

Functions

func DecodeLoad

func DecodeLoad(data []byte) (int, opconst.StateMask)

    DecodeLoad decodes the state id and mask of a load op.

    func DecodeSave

    func DecodeSave(data []byte) int

      DecodeSave decodes the state id of a save op.

      func DecodeTransform

      func DecodeTransform(data []byte) (t f32.Affine2D)

      func EncodeQuad

      func EncodeQuad(d []byte, q Quad)

      Types

      type EncodedOp

      type EncodedOp struct {
      	Key  Key
      	Data []byte
      	Refs []interface{}
      }

        EncodedOp represents an encoded op returned by Reader.

        type Key

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

          Key is a unique key for a given op.

          func (Key) SetTransform

          func (k Key) SetTransform(t f32.Affine2D) Key

          type Quad

          type Quad struct {
          	From, Ctrl, To f32.Point
          }

          func DecodeQuad

          func DecodeQuad(d []byte) (q Quad)

          func (Quad) Transform

          func (q Quad) Transform(t f32.Affine2D) Quad

          type Reader

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

            Reader parses an ops list.

            func (*Reader) Decode

            func (r *Reader) Decode() (EncodedOp, bool)

            func (*Reader) Reset

            func (r *Reader) Reset(ops *op.Ops)

              Reset start reading from the op list.

              Source Files