Documentation ¶
Index ¶
- Constants
- func NewCompiler(page *fig.NodeChange, opts *CompilerOpts) string
- type AlignAttribute
- type AnchorAttribute
- type Attribute
- type AttributeList
- type Axis
- type ColorAttribute
- type Compiler
- func (c *Compiler) AddElement(el fmt.Stringer)
- func (c *Compiler) CleanupText(t string) string
- func (c *Compiler) ConvertPageToTikz() string
- func (c *Compiler) FindNode(g *fig.GUID) DrawingNode
- func (c *Compiler) IsArrowDiagonal(start, end Position) bool
- func (c *Compiler) MagnetToDirection(magnet fig.ConnectorMagnet) Direction
- func (c *Compiler) PositionForNode(node DrawingNode, magnet fig.ConnectorMagnet) (pos Position)
- type CompilerOpts
- type Direction
- type Draw
- type DrawAttribute
- type DrawingNode
- type FillAttribute
- type FillDraw
- type Node
- type Position
- func (p Position) AxisRelativeTo(p2 Position) Axis
- func (p Position) Diff(of Position) Position
- func (p Position) DirectionTo(pos Position) Direction
- func (p Position) MiddleWith(p2 Position) Position
- func (p Position) String() string
- func (p Position) Sub(pos Position) Position
- func (p Position) Sum(p2 Position) Position
- type PositionList
- type RotateAroundAttribute
- type RoundedCornersAttribute
- type ScaleAroundAttribute
- type Shape
- type Side
- type ThickAttribute
- type ToAttribute
- type XAdjuster
Constants ¶
View Source
const VERSION = "v0.1"
Variables ¶
This section is empty.
Functions ¶
func NewCompiler ¶
func NewCompiler(page *fig.NodeChange, opts *CompilerOpts) string
Types ¶
type AlignAttribute ¶
type AlignAttribute string
func (AlignAttribute) GetPosition ¶
func (a AlignAttribute) GetPosition() Position
func (AlignAttribute) HasPosition ¶
func (a AlignAttribute) HasPosition() bool
func (AlignAttribute) SetPosition ¶
func (a AlignAttribute) SetPosition(p Position)
func (AlignAttribute) String ¶
func (a AlignAttribute) String() string
type AnchorAttribute ¶
type AnchorAttribute string
func (AnchorAttribute) GetPosition ¶
func (a AnchorAttribute) GetPosition() Position
func (AnchorAttribute) HasPosition ¶
func (a AnchorAttribute) HasPosition() bool
func (AnchorAttribute) SetPosition ¶
func (a AnchorAttribute) SetPosition(p Position)
func (AnchorAttribute) String ¶
func (a AnchorAttribute) String() string
type AttributeList ¶
type AttributeList []Attribute
func (AttributeList) MinX ¶
func (a AttributeList) MinX() float32
func (AttributeList) String ¶
func (a AttributeList) String() string
type ColorAttribute ¶
type ColorAttribute string
func (ColorAttribute) GetPosition ¶
func (c ColorAttribute) GetPosition() Position
func (ColorAttribute) HasPosition ¶
func (c ColorAttribute) HasPosition() bool
func (ColorAttribute) SetPosition ¶
func (c ColorAttribute) SetPosition(p Position)
func (ColorAttribute) String ¶
func (c ColorAttribute) String() string
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
func (*Compiler) AddElement ¶
func (*Compiler) CleanupText ¶
func (*Compiler) ConvertPageToTikz ¶
func (*Compiler) IsArrowDiagonal ¶
func (*Compiler) MagnetToDirection ¶
func (c *Compiler) MagnetToDirection(magnet fig.ConnectorMagnet) Direction
func (*Compiler) PositionForNode ¶
func (c *Compiler) PositionForNode(node DrawingNode, magnet fig.ConnectorMagnet) (pos Position)
type CompilerOpts ¶
type Draw ¶
type Draw struct { Attributes AttributeList Points PositionList Text *string Kind *string }
type DrawAttribute ¶
type DrawAttribute string
func (DrawAttribute) GetPosition ¶
func (d DrawAttribute) GetPosition() Position
func (DrawAttribute) HasPosition ¶
func (d DrawAttribute) HasPosition() bool
func (DrawAttribute) SetPosition ¶
func (d DrawAttribute) SetPosition(p Position)
func (DrawAttribute) String ¶
func (d DrawAttribute) String() string
type DrawingNode ¶
type DrawingNode struct { Node *fig.NodeChange Q1 Position Q2 Position Size Position }
func MakeDrawingNode ¶
func MakeDrawingNode(v *fig.NodeChange) DrawingNode
func (DrawingNode) RelativeSideOf ¶
func (d DrawingNode) RelativeSideOf(other DrawingNode) (s Side)
type FillAttribute ¶
type FillAttribute struct{ Value string }
func (*FillAttribute) GetPosition ¶
func (f *FillAttribute) GetPosition() Position
func (*FillAttribute) HasPosition ¶
func (f *FillAttribute) HasPosition() bool
func (*FillAttribute) SetPosition ¶
func (f *FillAttribute) SetPosition(p Position)
func (*FillAttribute) String ¶
func (f *FillAttribute) String() string
type FillDraw ¶
type FillDraw struct { Attributes AttributeList Position Position Shape string Size string }
type Node ¶
type Node struct { Attributes AttributeList Position Position Text *string }
type Position ¶
type Position struct {
X, Y float32
}
func (Position) AxisRelativeTo ¶
func (Position) DirectionTo ¶
func (Position) MiddleWith ¶
type PositionList ¶
type PositionList []Position
func (PositionList) String ¶
func (p PositionList) String() string
type RotateAroundAttribute ¶
func (*RotateAroundAttribute) GetPosition ¶
func (r *RotateAroundAttribute) GetPosition() Position
func (*RotateAroundAttribute) HasPosition ¶
func (r *RotateAroundAttribute) HasPosition() bool
func (*RotateAroundAttribute) SetPosition ¶
func (r *RotateAroundAttribute) SetPosition(p Position)
func (*RotateAroundAttribute) String ¶
func (r *RotateAroundAttribute) String() string
type RoundedCornersAttribute ¶
type RoundedCornersAttribute struct{ Value int }
func (*RoundedCornersAttribute) GetPosition ¶
func (r *RoundedCornersAttribute) GetPosition() Position
func (*RoundedCornersAttribute) HasPosition ¶
func (r *RoundedCornersAttribute) HasPosition() bool
func (*RoundedCornersAttribute) SetPosition ¶
func (r *RoundedCornersAttribute) SetPosition(p Position)
func (*RoundedCornersAttribute) String ¶
func (r *RoundedCornersAttribute) String() string
type ScaleAroundAttribute ¶
func (*ScaleAroundAttribute) GetPosition ¶
func (s *ScaleAroundAttribute) GetPosition() Position
func (*ScaleAroundAttribute) HasPosition ¶
func (s *ScaleAroundAttribute) HasPosition() bool
func (*ScaleAroundAttribute) SetPosition ¶
func (s *ScaleAroundAttribute) SetPosition(p Position)
func (*ScaleAroundAttribute) String ¶
func (s *ScaleAroundAttribute) String() string
type Shape ¶
type Shape struct { Attributes AttributeList P1, P2 Position Text *string Kind string }
type ThickAttribute ¶
type ThickAttribute struct{}
func (*ThickAttribute) GetPosition ¶
func (t *ThickAttribute) GetPosition() Position
func (*ThickAttribute) HasPosition ¶
func (t *ThickAttribute) HasPosition() bool
func (*ThickAttribute) SetPosition ¶
func (t *ThickAttribute) SetPosition(p Position)
func (*ThickAttribute) String ¶
func (t *ThickAttribute) String() string
type ToAttribute ¶
type ToAttribute struct{}
func (*ToAttribute) GetPosition ¶
func (t *ToAttribute) GetPosition() Position
func (*ToAttribute) HasPosition ¶
func (t *ToAttribute) HasPosition() bool
func (*ToAttribute) SetPosition ¶
func (t *ToAttribute) SetPosition(p Position)
func (*ToAttribute) String ¶
func (t *ToAttribute) String() string
Click to show internal directories.
Click to hide internal directories.