Documentation ¶
Index ¶
- Variables
- func AddToDegressiveLine(img *image.RGBA64, x0, y0, x1, y1 int, c color.RGBA64)
- func AddToLine(img *image.RGBA64, x0, y0, x1, y1 int, c color.RGBA64)
- func AddToSandLine(img *image.RGBA64, p0, p1 Point, c color.RGBA64, sandCoef int)
- func AddToSandSpiralLine(img *image.RGBA64, p0, p1 Point, c color.RGBA64, sandCoef int)
- func AddToSandTunnelLine(img *image.RGBA64, p0, p1 Point, c color.RGBA64, sandCoef int)
- func AddToWuLine(img *image.RGBA64, x1, y1, x2, y2 float64, w int, col color.RGBA64)
- func AutomoveLines(coef int, nbLines int, c color.RGBA64)
- func BasicDiagonalLine()
- func BasicDiamondGrid()
- func BasicPointPerPoint()
- func BasicRoundLine()
- func BiSymDiagonalLine()
- func BiSymInversedSurroundedDiagonalLine()
- func BiSymSurroundedDiagonalLine(coef int, colors []color.RGBA64, symetryType int)
- func DiamondBigger(img *image.RGBA64, cx, cy, size int, c color.RGBA64)
- func DrawPoint(img *image.RGBA64, cx, cy int, c color.RGBA64)
- func DrawSandCurve(img *image.RGBA64, points []Point, c color.RGBA64, sandCoef int)
- func DrawSandSpiralCurve(img *image.RGBA64, points []Point, c color.RGBA64, sandCoef int)
- func DrawSandTunnelCurve(img *image.RGBA64, points []Point, c color.RGBA64, sandCoef int)
- func ImageOpacity(img *image.RGBA64, c color.RGBA64)
- func InversedSurroundedDiagonalLine()
- func Line(img *image.RGBA64, x0, y0, x1, y1 int, c color.RGBA64)
- func QuadSymDiagonalLine()
- func QuadSymInversedSurroundedDiagonalLine()
- func QuadSymSurroundedDiagonalLine(coef int, colors []color.RGBA64)
- func Round(img *image.RGBA64, x0, y0, x1, y1 int, c color.RGBA64)
- func SetBaseColor(color color.RGBA64)
- func SetCycles(nb int)
- func SetDrawer(f func(*image.RGBA64))
- func SetImage(i *image.RGBA64)
- func SetNumberSeed(s int)
- func SetParam1(p int)
- func SetParam2(p int)
- func SetParam3(p int)
- func SetParamColors(c []color.RGBA64)
- func Spiral()
- func Subdivision(coef int, colors []color.RGBA64)
- func SurroundedDiagonalLine(coef int, colors []color.RGBA64)
- func Tunnel()
- func TurningHazardousShape()
- type CartesianPoint
- type Point
- type PolarPoint
Constants ¶
This section is empty.
Variables ¶
var BiSymetry = map[string]int{
"horizontal": 0,
"vertical": 1,
"diagonal": 2,
}
BiSymetry contains possible symetries for BiSymetric generators
var Colors = map[string]color.RGBA64{ "empty": color.RGBA64{0x0000, 0x0000, 0x0000, 0x0000}, "white": color.RGBA64{0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}, "black": color.RGBA64{0x0000, 0x0000, 0x0000, 0xFFFF}, }
Colors is a list of basic colors
var ColorsPacks = map[string][]color.RGBA64{ "trisummer": []color.RGBA64{ color.RGBA64{0xF400, 0x4300, 0x3600, 0xFFFF}, color.RGBA64{0xFF00, 0xC100, 0x0700, 0xFFFF}, color.RGBA64{0xEF00, 0x6C00, 0x0000, 0xFFFF}, }, "green": []color.RGBA64{ color.RGBA64{0x4C00, 0xAF00, 0x5000, 0xFFFF}, color.RGBA64{0x3300, 0x6900, 0x1E00, 0xFFFF}, color.RGBA64{0x9C00, 0xCC00, 0x6500, 0xFFFF}, color.RGBA64{0x0000, 0x8900, 0x7B00, 0xFFFF}, }, "space": []color.RGBA64{ color.RGBA64{0x0500, 0x3700, 0x7b00, 0xFFFF}, color.RGBA64{0x0400, 0x2c00, 0x6200, 0xFFFF}, color.RGBA64{0x0300, 0x2100, 0x4a00, 0xFFFF}, color.RGBA64{0x0200, 0x1600, 0x3100, 0xFFFF}, color.RGBA64{0x0100, 0x0B00, 0x1900, 0xFFFF}, }, "rainbow": []color.RGBA64{ color.RGBA64{0xF400, 0x4300, 0x3600, 0xFFFF}, color.RGBA64{0xFF00, 0x9800, 0x0000, 0xFFFF}, color.RGBA64{0xFF00, 0xEB00, 0x3B00, 0xFFFF}, color.RGBA64{0x4C00, 0xAF00, 0x5000, 0xFFFF}, color.RGBA64{0x2100, 0x9600, 0xF300, 0xFFFF}, color.RGBA64{0x3F00, 0x5100, 0xB500, 0xFFFF}, color.RGBA64{0x9C00, 0x2700, 0xB000, 0xFFFF}, }, "beach": []color.RGBA64{ color.RGBA64{0x2100, 0x9600, 0xF300, 0xFFFF}, color.RGBA64{0xFF00, 0xC100, 0x0700, 0xFFFF}, }, "synthwave": []color.RGBA64{ color.RGBA64{0x9200, 0x0000, 0x7500, 0xFFFF}, color.RGBA64{0xFF00, 0x6C00, 0x1100, 0xFFFF}, color.RGBA64{0x0D00, 0x0200, 0x2100, 0xFFFF}, }, "grey": []color.RGBA64{ Colors["white"], Colors["black"], }, }
ColorsPacks are group of colors
Functions ¶
func AddToDegressiveLine ¶
AddToDegressiveLine draws line by Bresenham's algorithm.
func AddToSandLine ¶
AddToSandLine draws line by Bresenham's algorithm.
func AddToSandSpiralLine ¶
AddToSandSpiralLine draws line by Bresenham's algorithm.
func AddToSandTunnelLine ¶
AddToSandTunnelLine draws line by Bresenham's algorithm.
func AddToWuLine ¶
AddToWuLine draws line with Xialang Wu algorithm
func AutomoveLines ¶
AutomoveLines draws a diamond grid
func BasicDiagonalLine ¶
func BasicDiagonalLine()
BasicDiagonalLine draws an image with diagonal lines
func BasicPointPerPoint ¶
func BasicPointPerPoint()
BasicPointPerPoint draws an random image point per point
func BiSymDiagonalLine ¶
func BiSymDiagonalLine()
BiSymDiagonalLine draws an image with diagonal lines, with a simple symetry
func BiSymInversedSurroundedDiagonalLine ¶
func BiSymInversedSurroundedDiagonalLine()
BiSymInversedSurroundedDiagonalLine draws an image with diagonal lines and bi symetry
func BiSymSurroundedDiagonalLine ¶
BiSymSurroundedDiagonalLine draws an image with diagonal lines and bi symetry
func DiamondBigger ¶
DiamondBigger draw a diamond around a center, with a bigger size than normal
func DrawSandCurve ¶
DrawSandCurve draw a diamond around a center, with a bigger size than normal
func DrawSandSpiralCurve ¶
DrawSandSpiralCurve draw a diamond around a center, with a bigger size than normal
func DrawSandTunnelCurve ¶
DrawSandTunnelCurve draw a diamond around a center, with a bigger size than normal
func ImageOpacity ¶
ImageOpacity change opacity of drawn pixels
func InversedSurroundedDiagonalLine ¶
func InversedSurroundedDiagonalLine()
InversedSurroundedDiagonalLine draws an image with diagonal lines
func QuadSymDiagonalLine ¶
func QuadSymDiagonalLine()
QuadSymDiagonalLine draws an image with diagonal lines with quad symetry
func QuadSymInversedSurroundedDiagonalLine ¶
func QuadSymInversedSurroundedDiagonalLine()
QuadSymInversedSurroundedDiagonalLine draws an image with diagonal lines and quad symetry
func QuadSymSurroundedDiagonalLine ¶
QuadSymSurroundedDiagonalLine draws an image with diagonal lines and quad symetry
func SetParamColors ¶
SetParamColors sets the colors parameter for generator
func SurroundedDiagonalLine ¶
SurroundedDiagonalLine draws an image with diagonal lines
func TurningHazardousShape ¶
func TurningHazardousShape()
TurningHazardousShape draws a turning shape
Types ¶
type CartesianPoint ¶
type CartesianPoint struct {
// contains filtered or unexported fields
}
CartesianPoint is a cartesian representation of point
type Point ¶
type Point struct {
// contains filtered or unexported fields
}
Point is a mathematical point
type PolarPoint ¶
type PolarPoint struct {
// contains filtered or unexported fields
}
PolarPoint is an polar representation of point
Source Files ¶
- b_colors.go
- b_constants.go
- b_draw.go
- b_math.go
- b_move.go
- g_automoveCenterLines.go
- g_automoveLines.go
- g_basicDiagonalLine.go
- g_basicDiamondGrid.go
- g_basicPointPerPoint.go
- g_basicRoundLine.go
- g_biSymDiagonalLine.go
- g_inversedSurroundedDiagonalLine.go
- g_quadSymDiagonalLine.go
- g_spiral.go
- g_subdivision.go
- g_surroundedDiagonalLine.go
- g_turningHazardousShape.go
- setter.go