img

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FaviewNode

type FaviewNode struct {
	NameNode *Node

	Items         []*Node
	ItemNameList  string
	SelectedIndex int
	LastModified  time.Time

	Parent   *FaviewNode
	Children []FaviewNode
}

func (*FaviewNode) AllName

func (fn *FaviewNode) AllName() []string

func (*FaviewNode) AllState

func (fn *FaviewNode) AllState() []string

func (*FaviewNode) EnumItemNode

func (fn *FaviewNode) EnumItemNode() []*FaviewNode

func (*FaviewNode) FullName

func (fn *FaviewNode) FullName() string

func (*FaviewNode) Name

func (fn *FaviewNode) Name() string

func (*FaviewNode) SelectedName

func (fn *FaviewNode) SelectedName() string

func (*FaviewNode) SelectedState

func (fn *FaviewNode) SelectedState() string

type Flip

type Flip int
const (
	FlipNone Flip = iota
	FlipX
	FlipY
	FlipXY
)

type Image

type Image struct {
	FilePath   *string
	FileHash   uint32
	LastAccess time.Time

	PSD *composite.Tree

	Layers *LayerManager
	Flip   Flip

	InitialLayerState *string

	Modified bool

	Scale   float32
	OffsetX int
	OffsetY int

	PFV *PFV
	// contains filtered or unexported fields
}

func (*Image) Clone

func (img *Image) Clone() *Image

func (*Image) Deserialize

func (img *Image) Deserialize(s string) (bool, error)

func (*Image) FlipX

func (img *Image) FlipX() bool

func (*Image) FlipY

func (img *Image) FlipY() bool

func (*Image) Render

func (img *Image) Render(ctx context.Context) (*image.RGBA, error)

func (*Image) ScaledCanvasRect

func (img *Image) ScaledCanvasRect() image.Rectangle

func (*Image) Serialize

func (img *Image) Serialize() string

func (*Image) SetFlipX

func (img *Image) SetFlipX(v bool) bool

func (*Image) SetFlipY

func (img *Image) SetFlipY(v bool) bool

type LayerManager

type LayerManager struct {
	Renderer *composite.Renderer

	Mapped   map[int]*composite.Layer
	Flat     []int
	FullPath map[string]int // int != SeqID

	ForceVisible map[int]struct{}
	Group        map[int]*[]int
	FlipXPair    flipPair
	FlipYPair    flipPair
	FlipXYPair   flipPair
}

func NewLayerManager

func NewLayerManager(tree *composite.Tree) *LayerManager

func (*LayerManager) Deserialize

func (m *LayerManager) Deserialize(s string, flip Flip, faviewRoot *FaviewNode) (bool, Flip, error)

func (*LayerManager) Normalize

func (m *LayerManager) Normalize(flip Flip) bool

func (*LayerManager) NormalizeFlipOne

func (m *LayerManager) NormalizeFlipOne(seqID int, flip Flip) bool

func (*LayerManager) NormalizeMap

func (m *LayerManager) NormalizeMap(layers map[int]*deserializingState, flip Flip) bool

func (*LayerManager) Serialize

func (m *LayerManager) Serialize() string

func (*LayerManager) SetVisible

func (m *LayerManager) SetVisible(seqID int, visible bool, flip Flip) bool

func (*LayerManager) SetVisibleExclusive

func (m *LayerManager) SetVisibleExclusive(seqID int, visible bool, flip Flip) bool

type Node

type Node struct {
	Name          string
	Open          bool
	Children      []Node
	Parent        *Node
	FilterSetting []bool
	Setting       []bool
}

func (*Node) Filter

func (n *Node) Filter() bool

func (*Node) Folder

func (n *Node) Folder() bool

func (*Node) Item

func (n *Node) Item() bool

func (*Node) RawState

func (n *Node) RawState() (filter, visibility []bool)

func (*Node) State

func (n *Node) State() string

type PFV

type PFV struct {
	Setting    map[string]string
	Root       Node
	FaviewRoot FaviewNode
}

func NewPFV

func NewPFV(r io.Reader, mgr *LayerManager) (*PFV, error)

Jump to

Keyboard shortcuts

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