shape

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shape2d

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

func Shape

func Shape(vertices ...*Vert2d) *Shape2d

func (Shape2d) Draw

func (s Shape2d) Draw(canvas *svg.SVG, offX float64, offY float64, scaleX float64, scaleY float64, fill *colorful.Color, stroke *colorful.Color)

func (*Shape2d) Flip

func (s *Shape2d) Flip(flipX bool, flipY bool)

func (*Shape2d) Rotate

func (s *Shape2d) Rotate()

type Vert2d

type Vert2d struct {
	X float64
	Y float64
}

func MinVert

func MinVert(verts ...*Vert2d) *Vert2d

func Vert

func Vert(x float64, y float64) *Vert2d

func VertAngle

func VertAngle(r float64, angle float64) *Vert2d

func Zero

func Zero() *Vert2d

func (*Vert2d) Invert

func (v *Vert2d) Invert()

func (*Vert2d) Multiply

func (v *Vert2d) Multiply(other *Vert2d)

func (*Vert2d) Plus

func (v *Vert2d) Plus(other *Vert2d)

func (*Vert2d) Rotate

func (v *Vert2d) Rotate()

Jump to

Keyboard shortcuts

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