Documentation ¶
Index ¶
- type Painter
- func (p Painter) Paint(g Geometric)
- func (p *Painter) Style(newStyle string)
- func (p Painter) VisitCircle(c Circle)
- func (p Painter) VisitEllipse(e Ellipse)
- func (p Painter) VisitGroup(s Group)
- func (p Painter) VisitImage(i Image)
- func (p Painter) VisitLineSegment(l LineSegment)
- func (p Painter) VisitPolygon(poly Polygon)
- func (p Painter) VisitRectangle(r Rectangle)
- func (p Painter) VisitRotate(r Rotate)
- func (p Painter) VisitRoundedRectangle(r RoundedRectangle)
- func (p Painter) VisitScale(s Scale)
- func (p Painter) VisitStyle(s Style)
- func (p Painter) VisitText(t Text)
- func (p Painter) VisitTranslate(t Translate)
- type SVGF
- func (svgf *SVGF) Circle(x float64, y float64, r float64, s ...string)
- func (svgf *SVGF) Ellipse(x1 float64, y1 float64, rx float64, ry float64, s ...string)
- func (svgf *SVGF) Image(xc, yc float64, w, h float64, href, s string)
- func (svgf *SVGF) Line(x1 float64, y1 float64, x2 float64, y2 float64, s ...string)
- func (svgf *SVGF) Polygon(x []float64, y []float64, s ...string)
- func (svgf *SVGF) Text(x float64, y float64, dx float64, dy float64, t string, s string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Painter ¶
type Painter struct {
// contains filtered or unexported fields
}
Painter is a Geometric Visitor that renders SVG documents It translates the Zenna coordinate system (Y=up) to that of SVG (Y=down)
func NewSVGPainter ¶
func (Painter) VisitCircle ¶
func (p Painter) VisitCircle(c Circle)
func (Painter) VisitEllipse ¶
func (p Painter) VisitEllipse(e Ellipse)
VisitEllipse is part of Visitor
func (Painter) VisitGroup ¶
func (p Painter) VisitGroup(s Group)
func (Painter) VisitImage ¶
func (p Painter) VisitImage(i Image)
func (Painter) VisitLineSegment ¶
func (p Painter) VisitLineSegment(l LineSegment)
func (Painter) VisitPolygon ¶
func (p Painter) VisitPolygon(poly Polygon)
func (Painter) VisitRectangle ¶
func (p Painter) VisitRectangle(r Rectangle)
func (Painter) VisitRotate ¶
func (p Painter) VisitRotate(r Rotate)
func (Painter) VisitRoundedRectangle ¶
func (p Painter) VisitRoundedRectangle(r RoundedRectangle)
func (Painter) VisitScale ¶
func (p Painter) VisitScale(s Scale)
func (Painter) VisitStyle ¶
func (p Painter) VisitStyle(s Style)
func (Painter) VisitTranslate ¶
func (p Painter) VisitTranslate(t Translate)
type SVGF ¶
func (*SVGF) Circle ¶
Circle centered at x,y, with radius r, with optional style. Standard Reference: http://www.w3.org/TR/SVG11/shapes.html#CircleElement
func (*SVGF) Image ¶
Image places at x,y (upper left hand corner), the image with width w, and height h, referenced at link, with optional style. Standard Reference: http://www.w3.org/TR/SVG11/struct.html#ImageElement
func (*SVGF) Line ¶
Line draws a straight line between two points, with optional style. Standard Reference: http://www.w3.org/TR/SVG11/shapes.html#LineElement
func (*SVGF) Polygon ¶
Polygon draws a series of line segments using an array of x, y coordinates, with optional style. Standard Reference: http://www.w3.org/TR/SVG11/shapes.html#PolygonElement