image

package
v0.0.0-...-8bc4759 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package image is a go library that creates images from board positions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarkSquares

func MarkSquares(c color.Color, sqs ...chess.Square) func(*encoder)

MarkSquares is designed to be used as an optional argument to the SVG function. It marks the given squares with the color. A possible usage includes marking squares of the previous move.

func SVG

func SVG(w io.Writer, b *chess.Board, opts ...func(*encoder)) error

SVG writes the board SVG representation into the writer. An error is returned if there is there is an error writing data. SVG also takes options which can customize the image output.

func SquareColors

func SquareColors(light, dark color.Color) func(*encoder)

SquareColors is designed to be used as an optional argument to the SVG function. It changes the default light and dark square colors to the colors given.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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