Documentation ¶
Index ¶
- type Circle
- type Container
- type Element
- func (e *Element) DOMElement() *dom.Element
- func (e *Element) OnClick(h dom.MouseEventHandler)
- func (e *Element) OnMouseDown(h dom.MouseEventHandler)
- func (e *Element) OnMouseMove(h dom.MouseEventHandler)
- func (e *Element) OnMouseUp(h dom.MouseEventHandler)
- func (e *Element) SetAttribute(k string, v interface{})
- func (e *Element) Style() *dom.Style
- func (e *Element) Transform(arr ...Transform)
- func (e *Element) Translate(x, y float64)
- type G
- type Line
- type Rect
- type Rotate
- type RotatePt
- type SVG
- type Scale
- type Text
- type Transform
- type Translate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Circle ¶
type Circle struct {
Element
}
Circle is an SVG circle element.
type Container ¶
type Container struct {
Element
}
Container is a common base for SVG elements that can contain other elements.
func NewContainer ¶
NewContainer creates an SVG element that provides container-like API (like "g").
func (*Container) NewCircle ¶
NewCircle creates an SVG circle with a given radius in this container.
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
Element is a common base for SVG elements.
func (*Element) DOMElement ¶
DOMElement returns a dom.Element associated with this SVG element.
func (*Element) OnClick ¶
func (e *Element) OnClick(h dom.MouseEventHandler)
OnClick registers an onclick event listener.
func (*Element) OnMouseDown ¶
func (e *Element) OnMouseDown(h dom.MouseEventHandler)
OnMouseDown registers an onmousedown event listener.
func (*Element) OnMouseMove ¶
func (e *Element) OnMouseMove(h dom.MouseEventHandler)
OnMouseMove registers an onmousemove event listener.
func (*Element) OnMouseUp ¶
func (e *Element) OnMouseUp(h dom.MouseEventHandler)
OnMouseUp registers an onmouseup event listener.
func (*Element) SetAttribute ¶
SetAttribute sets an attribute of SVG element.
type Rect ¶
type Rect struct {
Element
}
Rect is an SVG rectangle element.
type Rotate ¶
type Rotate struct {
A float64
}
Rotate rotates an element relative to the parent.
func (Rotate) TransformString ¶
type RotatePt ¶
type RotatePt struct {
A, X, Y float64
}
RotatePt rotates an element relative a point.
func (RotatePt) TransformString ¶
type SVG ¶
type SVG struct {
Container
}
SVG is a root SVG element.
func NewFullscreen ¶
func NewFullscreen() *SVG
NewFullscreen is like New, but the resulting element will try to fill the whole client area.
type Scale ¶
type Scale struct {
X, Y float64
}
Scale scales an element.