draw3

package
v0.0.0-...-d51f9a1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DrawGreedEnable = false

Functions

func DrawGreedGG

func DrawGreedGG(c *gg.Context, nx, ny int, greedWidth float64)

Types

type Point2f

type Point2f struct {
	X, Y float64
}
var ZP Point2f // zero point

func MakePoint2f

func MakePoint2f(x, y float64) Point2f

func Pt2f

func Pt2f(x, y float64) Point2f

type Size

type Size = Point2f

func MakeSize

func MakeSize(x, y float64) Size

type TritsDrawer

type TritsDrawer interface {
	SetDigitSize(digitSize Size)
	GetDigitSize() Size

	// n - number of trits
	Bounds(n int) Size

	Draw(c *gg.Context, p Point2f, digits []int)
}

type TritsDrawer1

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

func (*TritsDrawer1) Bounds

func (p *TritsDrawer1) Bounds(n int) Size

func (*TritsDrawer1) Draw

func (p *TritsDrawer1) Draw(c *gg.Context, pos Point2f, digits []int)

func (*TritsDrawer1) GetDigitSize

func (p *TritsDrawer1) GetDigitSize() Size

func (*TritsDrawer1) SetDigitSize

func (p *TritsDrawer1) SetDigitSize(digitSize Size)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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