Documentation ¶
Index ¶
- func A1() *size
- func A2() *size
- func A3() *size
- func A4() *size
- func A4Lanscape() *size
- func A4Smal() *size
- func A5() *size
- func Alignments(horizontal Horizontal, vertical Vertical) blockOpt
- func ApplyMulti(attrs ...blockOpt) blockOpt
- func Attr(key string, value any) blockOpt
- func B4() *size
- func B5() *size
- func BackgroundColor(color string) blockOpt
- func Border(width float64, color string) blockOpt
- func Color(color string) blockOpt
- func FontFamily(name string, src string) blockOpt
- func FontSize(size float64) blockOpt
- func FontWeight(weight string) blockOpt
- func Height(height float64) blockOpt
- func IsType(node *Node, typ Type) bool
- func Padding(top, right, bottom, left float64) blockOpt
- func Reflow(node *Node) error
- func Resize(node *Node) error
- func Size(w, h float64) *size
- func Width(width float64) blockOpt
- func X(x float64) blockOpt
- func XY(x, y float64) blockOpt
- func Y(y float64) blockOpt
- type Horizontal
- type Node
- type Nodes
- type Order
- type Type
- type Vertical
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func A4Lanscape ¶
func A4Lanscape() *size
func Alignments ¶
func Alignments(horizontal Horizontal, vertical Vertical) blockOpt
func ApplyMulti ¶
func ApplyMulti(attrs ...blockOpt) blockOpt
func BackgroundColor ¶
func BackgroundColor(color string) blockOpt
func FontFamily ¶
func FontWeight ¶
func FontWeight(weight string) blockOpt
Types ¶
type Node ¶
type Node struct {
X, Y float64
Width, Height float64
Padding [4]float64
Order Order
Horizontal Horizontal
Vertical Vertical
Attributes map[string]any
Children []*Node
}
func (*Node) AlignChildren ¶
func (n *Node) AlignChildren()
func (*Node) GetChildrenContainer ¶
GetChildrenContainer used to calculate the max width and height of the all children for current node. It uses x and y coordinate of the parent
func (*Node) GetContainer ¶
GetContainer returns the x, y, width, and height of the container of the node. The container is the area where the children of the node are placed.
Click to show internal directories.
Click to hide internal directories.