gocanvas

package module
v0.0.0-...-a777396 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Canvas *image.RGBA = image.NewRGBA(
	image.Rect(0, 0, Width, Height),
)
View Source
var Height = 600
View Source
var Loop = func() {
	panic("No loop function set")
}
View Source
var Width = 800

Functions

func DrawCircle

func DrawCircle(originX, originY int, radius float64, c color.Color, fill bool)

func DrawLine

func DrawLine(x1, y1, x2, y2 int, c color.Color)

func DrawRect

func DrawRect(x1, y1, x2, y2 int, c color.Color)

func ResetCanvas

func ResetCanvas()

func ScatterPlot

func ScatterPlot(d [][2]float64, c color.Color, scale [2]float64, connect ConnectMode)

func Start

func Start()

Types

type ConnectMode

type ConnectMode uint8
const (
	NoConnect ConnectMode = iota
	OpenConnect
	ClosedConnect
)

type Orientation

type Orientation uint8
const (
	North Orientation = iota
	East
	South
	West
)

func RandomOrientation

func RandomOrientation() Orientation

func (Orientation) Rotate

func (o Orientation) Rotate(r Rotation) Orientation

func (Orientation) String

func (o Orientation) String() string

type Rotation

type Rotation int8
const (
	CW  Rotation = 1
	CCW Rotation = -1
)

type Walker

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

func NewWalker

func NewWalker(x, y int) *Walker

func (*Walker) Tick

func (w *Walker) Tick()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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