phy

package
v0.0.0-...-78b167e Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LineWidth = 2
)

Variables

This section is empty.

Functions

func ColorForShape

func ColorForShape(shape *cp.Shape, data interface{}) cp.FColor

Types

type DrawOption

type DrawOption struct {
	Width, Height  int
	Flags          uint
	Outline        cp.FColor
	Constraint     cp.FColor
	CollisionPoint cp.FColor
	Data           interface{}
}

type Drawer

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

func NewDrawer

func NewDrawer(opt DrawOption) *Drawer

func (*Drawer) CollisionPointColor

func (d *Drawer) CollisionPointColor() cp.FColor

func (*Drawer) ConstraintColor

func (d *Drawer) ConstraintColor() cp.FColor

func (*Drawer) Data

func (d *Drawer) Data() interface{}

func (*Drawer) DrawCircle

func (d *Drawer) DrawCircle(pos cp.Vector, angle float64, radius float64, outline cp.FColor, fill cp.FColor, data interface{})

func (*Drawer) DrawDot

func (d *Drawer) DrawDot(size float64, pos cp.Vector, fill cp.FColor, data interface{})

func (*Drawer) DrawFatSegment

func (d *Drawer) DrawFatSegment(a cp.Vector, b cp.Vector, radius float64, outline cp.FColor, fill cp.FColor, data interface{})

func (*Drawer) DrawPolygon

func (d *Drawer) DrawPolygon(count int, verts []cp.Vector, radius float64, outline cp.FColor, fill cp.FColor, data interface{})

func (*Drawer) DrawSegment

func (d *Drawer) DrawSegment(a cp.Vector, b cp.Vector, fill cp.FColor, data interface{})

func (*Drawer) Flags

func (d *Drawer) Flags() uint

func (*Drawer) Image

func (d *Drawer) Image() image.Image

func (*Drawer) NewFrame

func (d *Drawer) NewFrame()

func (*Drawer) OutlineColor

func (d *Drawer) OutlineColor() cp.FColor

func (*Drawer) ShapeColor

func (d *Drawer) ShapeColor(shape *cp.Shape, data interface{}) cp.FColor

Jump to

Keyboard shortcuts

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