Documentation ¶
Overview ¶
Virtual Circuit Board package Data structures and methods to alter or create VCB blueprints
Colors are RGBA values for Decor Layers and Ink conversion ¶
Virtual Circuit Board Package Functions for parsing the image inside of blueprints
Layers are a structure containing the
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Colors = [...]Color{
{0, 0, 0, 0},
{42, 53, 65, 255},
{159, 168, 174, 255},
{161, 85, 94, 255},
{161, 108, 86, 255},
{161, 133, 86, 255},
{161, 152, 86, 255},
{153, 161, 86, 255},
{136, 161, 86, 255},
{108, 161, 86, 255},
{86, 161, 141, 255},
{86, 147, 161, 255},
{86, 123, 161, 255},
{86, 98, 161, 255},
{102, 86, 161, 255},
{135, 86, 161, 255},
{161, 85, 151, 255},
{102, 120, 142, 255},
{140, 171, 161, 255},
{58, 69, 81, 255},
{146, 255, 99, 255},
{255, 198, 99, 255},
{99, 242, 255, 255},
{174, 116, 255, 255},
{255, 98, 138, 255},
{255, 162, 0, 255},
{48, 217, 255, 255},
{166, 0, 255, 255},
{77, 56, 62, 255},
{46, 71, 93, 255},
{99, 255, 159, 255},
{56, 77, 71, 255},
{255, 0, 65, 255},
{255, 255, 255, 255},
}
RGBA colors for each Ink Ordered exactly like the ink enum
Functions ¶
func NewLayer ¶
func NewLayer[T interface { LogicLayer | DecorOnLayer | DecorOffLayer }](width int, height int) (*T, error)
Create a new layer
Types ¶
type Blueprint ¶
Blueprints contain a single layer Depending on which Type is set
func NewBlueprintFromBase64 ¶
Create a new blueprint from a base64 encoded string Allows to import blueprints from the game
func NewBlueprintFromLayer ¶
Create a new blueprint from layer
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context contains any layer and has drawing functions
type DecorOffLayer ¶
Decoration Off Layer Contains the RGBA color data
func (*DecorOffLayer) FromImage ¶
func (l *DecorOffLayer) FromImage(colors Image) error
Populate a decoration layer (Off) from colors
func (*DecorOffLayer) Get ¶
func (l *DecorOffLayer) Get(x int, y int) AnyPixel
Get color inside data
func (*DecorOffLayer) GetDimensions ¶
func (l *DecorOffLayer) GetDimensions() (int, int)
Get width and height of layer
func (*DecorOffLayer) Set ¶
func (l *DecorOffLayer) Set(pixel AnyPixel, x int, y int)
Set color inside data
func (*DecorOffLayer) ToImage ¶
func (l *DecorOffLayer) ToImage() (Image, error)
Convert decoration later (Off) to image
type DecorOnLayer ¶
Decoration On Layer Contains the RGBA color data
func (*DecorOnLayer) FromImage ¶
func (l *DecorOnLayer) FromImage(colors Image) error
Populate a decoration layer (On) from colors
func (*DecorOnLayer) GetDimensions ¶
func (l *DecorOnLayer) GetDimensions() (int, int)
Get width and height of layer
func (*DecorOnLayer) Set ¶
func (l *DecorOnLayer) Set(pixel AnyPixel, x int, y int)
Set color inside data
func (*DecorOnLayer) ToImage ¶
func (l *DecorOnLayer) ToImage() (Image, error)
Convert decoration layer (On) to image
type Ink ¶
type Ink int
Ink is any of the possible usable logical inks
const ( InkNone Ink = iota InkTraceGrey InkTraceWhite InkTraceRed InkTraceOrange InkTraceYellowW InkTraceYellowC InkTraceLemon InkTraceGreenW InkTraceGreenC InkTraceTurqouise InkTraceLightBlue InkTraceBlue InkTraceDarkBlue InkTracePurple InkTraceViolet InkTracePink InkCross InkFiller InkAnnotation InkBuffer InkAND InkOR InkXOR InkNOT InkNAND InkNOR InkXNOR InkWrite InkRead InkLatchOn InkLatchOff InkClock InkLED )
Ink enum May change between version depending on game updates
type LogicLayer ¶
Logical layer Contains the 'Inks' that builds up the circuit
func (*LogicLayer) FromImage ¶
func (l *LogicLayer) FromImage(colors Image) error
Populate logic layer from colors
func (*LogicLayer) GetDimensions ¶
func (l *LogicLayer) GetDimensions() (int, int)
Get width and height of layer
func (*LogicLayer) ToImage ¶
func (l *LogicLayer) ToImage() (Image, error)
Convert logic layer to colors