Documentation ¶
Overview ¶
The Draw method signature declared in the Drawer interface implements the method separately on Line and Text struct.
Index ¶
Constants ¶
View Source
const CellSize float64 = 20
CellSize defines symbol's cell size.
Variables ¶
This section is empty.
Functions ¶
func DrawDiagram ¶
DrawDiagram generates the diagram and saves into the image file.
Types ¶
type Diagram ¶
type Diagram struct{}
Diagram defines a basic empty struct.
func (*Diagram) ParseASCIIArt ¶
ParseASCIIArt parses a given ASCII string into a list of figures.
type Drawer ¶
type Drawer interface {
Draw(*Canvas)
}
Drawer interface defines the Canvas drawing method. Struct needs to implement the Draw method.
type Line ¶
type Line struct {
// contains filtered or unexported fields
}
Line struct defines the line x & y coordinates, the starting and ending type and the color.
type Point ¶
type Point struct {
// contains filtered or unexported fields
}
Point is an auxiliary struct used during parsing.
Click to show internal directories.
Click to hide internal directories.