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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ellipse

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

func NewEllipse

func NewEllipse(center point.Point, horizontalRadius, verticalRadius float64, color color.Color) (*Ellipse, error)

func (Ellipse) Draw

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

func (Ellipse) GetCenter

func (e Ellipse) GetCenter() point.Point

func (Ellipse) GetColor

func (c Ellipse) GetColor() color.Color

func (Ellipse) GetHorizontalRadius

func (e Ellipse) GetHorizontalRadius() float64

func (Ellipse) GetVerticalRadius

func (e Ellipse) GetVerticalRadius() float64

func (Ellipse) String

func (e Ellipse) String() string

type Rectangle

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

func NewRectangle

func NewRectangle(leftTop, rightBottom point.Point, color color.Color) *Rectangle

func (Rectangle) Draw

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

func (Rectangle) GetColor

func (c Rectangle) GetColor() color.Color

func (Rectangle) GetLeftTop

func (r Rectangle) GetLeftTop() point.Point

func (Rectangle) GetRightBottom

func (r Rectangle) GetRightBottom() point.Point

func (Rectangle) String

func (r Rectangle) String() string

type RegularPolygon

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

func NewRegularPolygon

func NewRegularPolygon(vertices uint, center point.Point, radius float64, color color.Color) (*RegularPolygon, error)

func (RegularPolygon) Draw

func (rp RegularPolygon) Draw(canvas canvas.Canvas)

func (RegularPolygon) GetCenter

func (rp RegularPolygon) GetCenter() point.Point

func (RegularPolygon) GetColor

func (c RegularPolygon) GetColor() color.Color

func (RegularPolygon) GetRadius

func (rp RegularPolygon) GetRadius() float64

func (RegularPolygon) GetVerticesCount

func (rp RegularPolygon) GetVerticesCount() uint

func (RegularPolygon) String

func (rp RegularPolygon) String() string

type Shape

type Shape interface {
	fmt.Stringer
	canvas.Drawable
}

type Triangle

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

func NewTriangle

func NewTriangle(a, b, c point.Point, color color.Color) Triangle

func (Triangle) Draw

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

func (Triangle) GetColor

func (c Triangle) GetColor() color.Color

func (Triangle) GetVertexA

func (t Triangle) GetVertexA() point.Point

func (Triangle) GetVertexB

func (t Triangle) GetVertexB() point.Point

func (Triangle) GetVertexC

func (t Triangle) GetVertexC() point.Point

func (Triangle) String

func (t Triangle) String() string

Jump to

Keyboard shortcuts

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