Versions in this module Expand all Collapse all v1 v1.2.0 Jul 25, 2024 Changes in this version + func InvertColours(state bool) + func IsColourInverted() bool v1.1.4 Jul 25, 2024 v1.1.3 Jun 3, 2024 Changes in this version type DThing + func (dt *DThing) PaintCallOut(out io.Writer) + func (dt *DThing) PaintHex(out io.Writer) + func (dt *DThing) PaintStep(out io.Writer) + func (dt *DThing) PaintTrap(out io.Writer) type Style + func (s *Style) FloatValue(key StyleKey, defVal float32) (val float32) + func (s *Style) IntValue(key StyleKey, defVal int) (val int) + func (s *Style) Size() int v1.1.2 Mar 12, 2024 v1.1.1 Nov 21, 2023 v1.1.0 Nov 21, 2023 Changes in this version + func BoundingBox(pts []*RealPoint) (minPt *RealPoint, maxPt *RealPoint) + type Alignment int + type Array struct + Kind string + Points []Point + type Colour struct + func NewColour(colour string) (c *Colour) + func (c *Colour) Composite() int64 + func (c *Colour) RGB() (int, int, int) + func (c *Colour) RgbPct() (float64, float64, float64) + func (c *Colour) SetColour(colour string) + func (c *Colour) String() string + type DFile struct + Dgrams []*Diagram + Version string + func (df *DFile) Next() bool + func (df *DFile) NextPage() *Diagram + func (df *DFile) Page() *Diagram + func (df *DFile) PageCount() int + func (df *DFile) Select(n int) + type DThing struct + Geom Geometry + Id string + Source string + StyleStr string + Target string + Value string + func (dt *DThing) AddAttachments(src, target *DThing) + func (dt *DThing) AttachPoint(pX, pY float64) (x, y int) + func (dt *DThing) Attachments() (src, target string) + func (dt *DThing) BoundingBox() (minPt *RealPoint, maxPt *RealPoint) + func (dt *DThing) Centre() (x int, y int) + func (dt *DThing) Dimensions() (w int, h int) + func (dt *DThing) Kind() DthingKind + func (dt *DThing) Paint(out io.Writer) + func (dt *DThing) PaintCircle(out io.Writer) + func (dt *DThing) PaintCloud(out io.Writer) + func (dt *DThing) PaintCylinder(out io.Writer) + func (dt *DThing) PaintDashedLine(out io.Writer) + func (dt *DThing) PaintFlexArrow(out io.Writer) + func (dt *DThing) PaintLine(out io.Writer) + func (dt *DThing) PaintPGram(out io.Writer) + func (dt *DThing) PaintRect(out io.Writer) + func (dt *DThing) PaintReport(out io.Writer) + func (dt *DThing) PaintRhomb(out io.Writer) + func (dt *DThing) PaintRoundRect(out io.Writer) + func (dt *DThing) PaintStorage(out io.Writer) + func (dt *DThing) PaintTangle(out io.Writer) + func (dt *DThing) PaintText(out io.Writer) + func (dt *DThing) Points() []Point + func (dt *DThing) RealPoints() []*RealPoint + func (dt *DThing) Style() *Style + func (dt *DThing) XY() (int, int) + type Diagram struct + Id string + Page []Model + type Drawing struct + Things []DThing + type DthingKind string + type Geometry struct + Height string + InnerPts Array + Points []Point + Width string + X string + Y string + func (gm *Geometry) AllPoints() []Point + func (gm *Geometry) HeightWidth() (height, width int) + func (gm *Geometry) WidthHeight() (width, height int) + type Model struct + Id string + PgHeight string + PgWidth string + Slate Drawing + func (m *Model) LetterScale() (float64, float64) + type Point struct + Kind string + X string + Y string + func (pt *Point) RealPt() *RealPoint + func (pt *Point) Set(x, y int) + func (pt *Point) XY() (x, y int) + func (pt *Point) XYf64() (xf, yf float64) + type Position int + type RealPoint struct + func NewRealPoint(x int, y int) *RealPoint + func (pt *RealPoint) Paint() string + func (pt *RealPoint) PullBack(anchor *RealPoint, dist int) *RealPoint + func (pt *RealPoint) Rotate(centre *RealPoint, angle float64) *RealPoint + func (pt *RealPoint) SlideOver(dist int, angle float64) *RealPoint + func (pt *RealPoint) String() string + func (pt *RealPoint) XY() (int, int) + type Sketch struct + func NewSketch(fname string) (*Sketch, error) + func (sk *Sketch) BoundingBox() (minPt *RealPoint, maxPt *RealPoint) + func (sk *Sketch) EleCount() int + func (sk *Sketch) Element(e int) *DThing + func (sk *Sketch) FirstSketch() + func (sk *Sketch) NextSketch() bool + func (sk *Sketch) PageScale() (float64, float64) + func (sk *Sketch) Pages() int + func (sk *Sketch) SelectPage(p int) + func (sk *Sketch) SelectSketch(p int) + type Style struct + func (s *Style) Add(sKey StyleKey, value string) + func (s *Style) Align() Alignment + func (s *Style) ArrowKind() (srcKind arrowKind, targetKind arrowKind) + func (s *Style) ArrowLoc() (atSrc, atTarget bool) + func (s *Style) DtKind() DthingKind + func (s *Style) DumpSettings() + func (s *Style) FillColour() string + func (s *Style) FontColour() string + func (s *Style) FontSz() int + func (s *Style) IsSet(sk StyleKey) bool + func (s *Style) IsSetWith(sk StyleKey, val string) bool + func (s *Style) LabelPos() Position + func (s *Style) LineColour() string + func (s *Style) Rotation() int + func (s *Style) VAlign() Alignment + func (s *Style) Value(key StyleKey) (val string, isThere bool) + func (s *Style) VertLabelPos() Position + type StyleKey string + type StyleStack struct + func NewStyleStack(defStyle *Style) *StyleStack + func (ss *StyleStack) Clear() + func (ss *StyleStack) Dump() + func (ss *StyleStack) Len() int + func (ss *StyleStack) Pop() + func (ss *StyleStack) Push(new *Style) + func (ss *StyleStack) Value(sKey StyleKey) (string, bool)