Documentation
¶
Overview ¶
Set DEBUG_ASCII=1 environment variable to enable verbose ASCII rendering debug logs.
Index ¶
- type ASCIIartist
- func (a *ASCIIartist) CalibrateXY(x, y float64) (float64, float64)
- func (a *ASCIIartist) GetBoundary(s d2target.Shape) (Point, Point)
- func (a *ASCIIartist) GetBoundaryForShape(s d2target.Shape) (asciiroute.Point, asciiroute.Point)
- func (a *ASCIIartist) GetCanvas() *asciicanvas.Canvas
- func (a *ASCIIartist) GetChars() charset.Set
- func (a *ASCIIartist) GetContext() context.Context
- func (a *ASCIIartist) GetDiagram() *d2target.Diagram
- func (a *ASCIIartist) GetFontHeight() float64
- func (a *ASCIIartist) GetFontWidth() float64
- func (a *ASCIIartist) GetScale() float64
- func (a *ASCIIartist) Render(ctx context.Context, diagram *d2target.Diagram, opts *RenderOpts) ([]byte, error)
- type Boundary
- type Point
- type RenderOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASCIIartist ¶
type ASCIIartist struct {
FW float64
FH float64
SCALE float64
// contains filtered or unexported fields
}
func NewASCIIartist ¶
func NewASCIIartist() *ASCIIartist
func (*ASCIIartist) CalibrateXY ¶
func (a *ASCIIartist) CalibrateXY(x, y float64) (float64, float64)
func (*ASCIIartist) GetBoundary ¶
func (a *ASCIIartist) GetBoundary(s d2target.Shape) (Point, Point)
func (*ASCIIartist) GetBoundaryForShape ¶
func (a *ASCIIartist) GetBoundaryForShape(s d2target.Shape) (asciiroute.Point, asciiroute.Point)
func (*ASCIIartist) GetCanvas ¶
func (a *ASCIIartist) GetCanvas() *asciicanvas.Canvas
func (*ASCIIartist) GetChars ¶
func (a *ASCIIartist) GetChars() charset.Set
func (*ASCIIartist) GetContext ¶
func (a *ASCIIartist) GetContext() context.Context
func (*ASCIIartist) GetDiagram ¶
func (a *ASCIIartist) GetDiagram() *d2target.Diagram
func (*ASCIIartist) GetFontHeight ¶
func (a *ASCIIartist) GetFontHeight() float64
func (*ASCIIartist) GetFontWidth ¶
func (a *ASCIIartist) GetFontWidth() float64
func (*ASCIIartist) GetScale ¶
func (a *ASCIIartist) GetScale() float64
func (*ASCIIartist) Render ¶
func (a *ASCIIartist) Render(ctx context.Context, diagram *d2target.Diagram, opts *RenderOpts) ([]byte, error)
type Point ¶
type Point = asciiroute.Point
type RenderOpts ¶
Click to show internal directories.
Click to hide internal directories.