shape

package
v0.0.0-...-2b4790d Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFrame

func NewFrame(rect rect.Rect) *frame

func NewStyles

func NewStyles() *styles

Types

type Ellipse

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

func (*Ellipse) Draw

func (e *Ellipse) Draw(c canvas.Canvas)

func (*Ellipse) GetFillStyle

func (s *Ellipse) GetFillStyle() style.FillStyle

func (*Ellipse) GetFrame

func (f *Ellipse) GetFrame() *rect.Rect

func (Ellipse) GetGroup

func (Ellipse) GetGroup() Group

func (*Ellipse) GetLineStyle

func (s *Ellipse) GetLineStyle() style.LineStyle

func (*Ellipse) SetFrame

func (f *Ellipse) SetFrame(frame rect.Rect)

type Group

type Group interface {
	Shape

	GetShapesCount() int
	GetShape(index int) Shape
	InsertShape(shape Shape, index int) bool
	RemoveShape(index int)
	// contains filtered or unexported methods
}

func NewGroup

func NewGroup() Group

type Rectangle

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

func (*Rectangle) Draw

func (r *Rectangle) Draw(c canvas.Canvas)

func (*Rectangle) GetFillStyle

func (s *Rectangle) GetFillStyle() style.FillStyle

func (*Rectangle) GetFrame

func (f *Rectangle) GetFrame() *rect.Rect

func (Rectangle) GetGroup

func (Rectangle) GetGroup() Group

func (*Rectangle) GetLineStyle

func (s *Rectangle) GetLineStyle() style.LineStyle

func (*Rectangle) SetFrame

func (f *Rectangle) SetFrame(frame rect.Rect)

type Shape

type Shape interface {
	GetFrame() *rect.Rect
	SetFrame(rect.Rect)

	GetLineStyle() style.LineStyle
	GetFillStyle() style.FillStyle

	GetGroup() Group

	Draw(canvas canvas.Canvas)
}

func NewEllipse

func NewEllipse(rect rect.Rect) Shape

func NewRectangle

func NewRectangle(rect rect.Rect) Shape

func NewTriangle

func NewTriangle(vertices [3]point.Point) Shape

type Triangle

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

func (*Triangle) Draw

func (t *Triangle) Draw(c canvas.Canvas)

func (*Triangle) GetFillStyle

func (s *Triangle) GetFillStyle() style.FillStyle

func (*Triangle) GetFrame

func (f *Triangle) GetFrame() *rect.Rect

func (Triangle) GetGroup

func (Triangle) GetGroup() Group

func (*Triangle) GetLineStyle

func (s *Triangle) GetLineStyle() style.LineStyle

func (*Triangle) GetVertex

func (t *Triangle) GetVertex(index uint) point.Point

func (*Triangle) SetFrame

func (f *Triangle) SetFrame(frame rect.Rect)

Jump to

Keyboard shortcuts

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