square

package
v0.0.0-...-5a4f024 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2015 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Squares are the components of a Matrix

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Square

type Square struct {
	X      int
	Y      int
	Width  float32
	Points []*point.Point
}

func (Square) BottomLeft

func (sq Square) BottomLeft() (x, y float32)

BottomLeft Get the equivalent of (1,0) for this square

func (*Square) Connect

func (sq *Square) Connect() point.PointList

func (*Square) Draw

func (sq *Square) Draw(canvas *drawing.Canvas)

Draw the square. Remember that the square should be ordered previously to make sure it prints in the intended order. Take a look at `github.com/Willyfrog/peano/matrix.Strategy` Interface

func (Square) Empty

func (sq Square) Empty() bool

Empty are any points inside?

func (Square) End

func (sq Square) End() (x, y float32)

End Get the equivalent of (1,1) for this square

func (Square) Origin

func (sq Square) Origin() (x, y float32)

Origin Get the equivalent of (0,0) for this square

func (Square) Partition

func (sq Square) Partition() [2][2]Square

Partition given a square subidivide it into 4

func (*Square) String

func (sq *Square) String() string

String make a printable version of the square and its contents

func (Square) TopRight

func (sq Square) TopRight() (x, y float32)

TopRight Get the equivalent of (0,1) for this square

Jump to

Keyboard shortcuts

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