svg

package
v0.0.0-...-ffe2c35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Circle

type Circle struct {
	Element
}

func (*Circle) Fill

func (c *Circle) Fill(cl dom.Color)

func (*Circle) SetPos

func (c *Circle) SetPos(x, y int)

func (*Circle) SetR

func (c *Circle) SetR(r int)

func (*Circle) Stroke

func (c *Circle) Stroke(cl dom.Color)

type Container

type Container struct {
	Element
}

func NewContainer

func NewContainer(tag string) *Container

func (*Container) NewCircle

func (c *Container) NewCircle(r int) *Circle

func (*Container) NewG

func (c *Container) NewG() *G

func (*Container) NewLine

func (c *Container) NewLine() *Line

func (*Container) NewRect

func (c *Container) NewRect(w, h int) *Rect

func (*Container) NewText

func (c *Container) NewText(str string) *Text

type Element

type Element struct {
	// contains filtered or unexported fields
}

func NewElement

func NewElement(tag string) *Element

func (*Element) DOMElement

func (e *Element) DOMElement() *dom.Element

func (*Element) OnClick

func (e *Element) OnClick(h dom.MouseEventHandler)

func (*Element) OnMouseDown

func (e *Element) OnMouseDown(h dom.MouseEventHandler)

func (*Element) OnMouseMove

func (e *Element) OnMouseMove(h dom.MouseEventHandler)

func (*Element) OnMouseUp

func (e *Element) OnMouseUp(h dom.MouseEventHandler)

func (*Element) SetAttribute

func (e *Element) SetAttribute(k string, v interface{})

func (*Element) Style

func (e *Element) Style() *dom.Style

func (*Element) Transform

func (e *Element) Transform(arr ...Transform)

func (*Element) Translate

func (e *Element) Translate(x, y float64)

type G

type G struct {
	Container
}

type Line

type Line struct {
	Element
}

func (*Line) SetPos

func (l *Line) SetPos(p1, p2 dom.Point)

func (*Line) SetPos1

func (l *Line) SetPos1(p dom.Point)

func (*Line) SetPos2

func (l *Line) SetPos2(p dom.Point)

func (*Line) SetStrokeWidth

func (l *Line) SetStrokeWidth(w float64)

type Rect

type Rect struct {
	Element
}

func (*Rect) Fill

func (c *Rect) Fill(cl dom.Color)

func (*Rect) SetPos

func (c *Rect) SetPos(x, y int)

func (*Rect) SetRound

func (c *Rect) SetRound(rx, ry int)

func (*Rect) SetSize

func (c *Rect) SetSize(w, h int)

func (*Rect) Stroke

func (c *Rect) Stroke(cl dom.Color)

type Rotate

type Rotate struct {
	A float64
}

func (Rotate) TransformString

func (t Rotate) TransformString() string

type RotatePt

type RotatePt struct {
	A, X, Y float64
}

func (RotatePt) TransformString

func (t RotatePt) TransformString() string

type SVG

type SVG struct {
	Container
}

func New

func New(w, h dom.Unit) *SVG

func NewFullscreen

func NewFullscreen() *SVG

type Scale

type Scale struct {
	X, Y float64
}

func (Scale) TransformString

func (t Scale) TransformString() string

type Text

type Text struct {
	Element
}

func (*Text) Selectable

func (t *Text) Selectable(v bool)

func (*Text) SetDPos

func (t *Text) SetDPos(dx, dy dom.Unit)

func (*Text) SetPos

func (t *Text) SetPos(x, y int)

func (*Text) SetText

func (t *Text) SetText(s string)

type Transform

type Transform interface {
	TransformString() string
}

type Translate

type Translate struct {
	X, Y float64
}

func (Translate) TransformString

func (t Translate) TransformString() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL