Documentation
¶
Index ¶
- Constants
- func FakeBoldStyler(m *font.Manager, f Font, t mark.Tag) (*font.Face, error)
- func Specs(reg *lit.Reg) lib.Specs
- func ZeroStyler(m *font.Manager, f Font, t mark.Tag) (*font.Face, error)
- type Border
- type Box
- type Code
- type Color
- type Dim
- type Dot
- type Font
- type Layouter
- type Node
- type NodeLayout
- type Off
- type Pos
- type Styler
- type Table
Constants ¶
View Source
const ( AlignLeft = iota AlignRight AlignCenter )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Border ¶
type Code ¶
type Code struct { Name string `json:"name,omitempty"` Human int `json:"human,omitempty"` Wide Dot `json:"wide,omitempty"` }
Code holds all qr and barcode related node data
type Font ¶
type Font struct { Name string `json:"name,omitempty"` Size float64 `json:"size,omitempty"` Line Dot `json:"line,omitempty"` Style mark.Tag `json:"-"` Height font.Pt `json:"-"` }
Font holds all font related node data
type Layouter ¶
Layouter implements the layout routine and holds required context
type Node ¶
type Node struct { Kind string `json:"kind"` Box NodeLayout Font *Font `json:"font,omitempty"` Border Border `json:"border,omitempty"` List []*Node `json:"list,omitempty"` Table Code *Code `json:"code,omitempty"` Data string `json:"data,omitempty"` Calc Box `json:"-"` }
Node is a part of the display tree and can represent any element.
type NodeLayout ¶
type NodeLayout struct { Mar *Off `json:"mar,omitempty"` Pad *Off `json:"pad,omitempty"` Rot int `json:"rot,omitempty"` Align int `json:"align,omitempty"` Gap Dot `json:"gap,omitempty"` Sub Dim `json:"sub,omitempty"` }
NodeLayout holds all layout related node data
type Off ¶
type Off struct { L Dot `json:"l,omitempty"` T Dot `json:"t,omitempty"` R Dot `json:"r,omitempty"` B Dot `json:"b,omitempty"` }
Off is a box offset consisting of left, top, right and bottom offsets in dot.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
Package html implements a layla renderer for html previews.
|
Package html implements a layla renderer for html previews. |
Package tsc provides helper functions to work with TSC label printers.
|
Package tsc provides helper functions to work with TSC label printers. |
Package tspl implements a renderer for TSPL format used by TSC thermal label printer.
|
Package tspl implements a renderer for TSPL format used by TSC thermal label printer. |
Click to show internal directories.
Click to hide internal directories.