ase: github.com/ARolek/ase Index | Files | Directories

package ase

import "github.com/ARolek/ase"

Index

Package Files

ase.go block.go color.go group.go

Variables

var (
    ErrInvalidFile      = errors.New("ase: file not an ASE file")
    ErrInvalidVersion   = errors.New("ase: version is not 1.0")
    ErrInvalidBlockType = errors.New("ase: invalid block type")
)
var (
    ErrInvalidColorType  = errors.New("ase: invalid color type")
    ErrInvalidColorValue = errors.New("ase: invalid color value")
    ErrInvalidColorModel = errors.New("ase: invalid color model")
)

func Encode Uses

func Encode(ase ASE, w io.Writer) (err error)

Encodes an ASE into any `w` that satisfies the io.Writer interface.

type ASE Uses

type ASE struct {
    Colors []Color
    Groups []Group
    // contains filtered or unexported fields
}

func Decode Uses

func Decode(r io.Reader) (ase ASE, err error)

Decodes a valid ASE input.

func DecodeFile Uses

func DecodeFile(file string) (ase ASE, err error)

Helper function that decodes a file into an ASE.

func (*ASE) Signature Uses

func (ase *ASE) Signature() string

Returns the file signature in a human readable format.

func (*ASE) Version Uses

func (ase *ASE) Version() string

Returns the file version in a human readable format.

type Color Uses

type Color struct {
    Name   string
    Model  string // CMYK, RGB, LAB or Gray
    Values []float32
    Type   string // Global, Spot, Normal
    // contains filtered or unexported fields
}

func (*Color) NameLen Uses

func (color *Color) NameLen() uint16

Helper function that returns the length of a color's name.

type Group Uses

type Group struct {
    Name   string
    Colors []Color
    // contains filtered or unexported fields
}

func (*Group) NameLen Uses

func (group *Group) NameLen() uint16

Helper function that returns the length of a group's name.

Directories

PathSynopsis
samples

Package ase imports 8 packages (graph) and is imported by 1 packages. Updated 2017-04-20. Refresh now. Tools for package owners.