utils

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const AxisCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXY"

Variables

This section is empty.

Functions

func FromDegrees

func FromDegrees(deg int) float64

func GetPaletteMonochromatic

func GetPaletteMonochromatic(steps int, initialPoint string) []color.RGBA

func GetPaletteRainbow

func GetPaletteRainbow(steps int) []color.RGBA

func GetRules

func GetRules(antName string) ([]bool, error)

func IsOutside

func IsOutside(point image.Point, rect image.Rectangle) bool

func NamedMatches

func NamedMatches(r, s string) map[string]string

func Open

func Open(fileName string)

func ParseInitialPoint

func ParseInitialPoint(initialPoint string) (int, int, bool, int, int)

func ParseRangeStr

func ParseRangeStr(rangeStr string) (minimum, maximum int, err error)

func ParseRectangleStr

func ParseRectangleStr(rectangleStr string) (rect image.Rectangle, scaleFactor int, err error)

func PointRect

func PointRect(p image.Point, maxDimension int) image.Rectangle

func PointSnap

func PointSnap(p image.Point, gridSize int) image.Point

func RectDiv

func RectDiv(r image.Rectangle, scaleFactor int) image.Rectangle

func RectGrow

func RectGrow(r image.Rectangle, maxDimension int) image.Rectangle

func StartCPUProfile

func StartCPUProfile(cpuprofile string)

func StopCPUProfile

func StopCPUProfile()

func WithUnderscores

func WithUnderscores(num uint64) string

Types

type CommonFlags

type CommonFlags struct {
	Cpuprofile string
	Memprofile string

	Dir          string
	InitialPoint string
	AntName      string
	Radius       float64

	MaxSteps       uint64
	MinCleanStreak uint64
	MaxNoisyDots   uint64
	MinSteps       uint64
	MinUniq        uint64

	Rectangle   image.Rectangle
	ScaleFactor int
	Monochrome  bool
}

func (*CommonFlags) CommonFlagsSetup

func (cf *CommonFlags) CommonFlagsSetup(gridLinesTotal uint8)

func (*CommonFlags) ParseArgs

func (cf *CommonFlags) ParseArgs()

func (*CommonFlags) ParseShorthand

func (cf *CommonFlags) ParseShorthand(shorthand string)

func (*CommonFlags) String

func (cf *CommonFlags) String() string

Jump to

Keyboard shortcuts

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