common

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rectangle

type Rectangle struct {
	Shape
	// contains filtered or unexported fields
}

func NewRectangle

func NewRectangle(w, h int) *Rectangle

func (*Rectangle) Draw

func (r *Rectangle) Draw(canvas *svg.SVG) error

func (*Rectangle) SetColor

func (r *Rectangle) SetColor(hex core.Hex)

func (*Rectangle) SetPadding

func (r *Rectangle) SetPadding(p int)

func (*Rectangle) SetPosition

func (r *Rectangle) SetPosition(x, y int)

type Shape

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

func (*Shape) AddAttr

func (s *Shape) AddAttr(style string)

func (*Shape) AttrString

func (s *Shape) AttrString() string

func (*Shape) Attributes

func (s *Shape) Attributes() []string

func (*Shape) ClearAttr

func (s *Shape) ClearAttr()

func (*Shape) SetID

func (s *Shape) SetID(id string)

type TextLabel

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

func NewTextLabel

func NewTextLabel(x, y int, text string) *TextLabel

func (*TextLabel) Draw

func (label *TextLabel) Draw(canvas *svg.SVG) error

func (*TextLabel) SetColor

func (label *TextLabel) SetColor(hex core.Hex)

func (*TextLabel) SetFontSize

func (label *TextLabel) SetFontSize(size int)

Jump to

Keyboard shortcuts

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