graphics

package
v0.0.0-...-a03d70d Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GIF_DELAY = 100
)

Variables

View Source
var (
	NeighborOdd  = [6][2]int{{1, 1}, {0, 1}, {-1, 0}, {0, -1}, {1, -1}, {1, 0}}
	NeighborEven = [6][2]int{{0, 1}, {-1, 1}, {-1, 0}, {-1, -1}, {0, -1}, {1, 0}}
)

Functions

func DrawPhysicalMap

func DrawPhysicalMap(mapData *fileio.Civ5MapData) image.Image

func DrawPoliticalMap

func DrawPoliticalMap(mapData *fileio.Civ5MapData) image.Image

func DrawReplay

func DrawReplay(mapData *fileio.Civ5MapData, replayData *fileio.Civ5ReplayData, outputFilename string)

func OverrideColorMap

func OverrideColorMap(civColorOverrides []fileio.CivColorOverride)

func SaveImage

func SaveImage(outputFilename string, im image.Image)

Types

type CivColor

type CivColor struct {
	OuterColor color.RGBA
	InnerColor color.RGBA
	TextColor  color.RGBA
}

type ColorRow

type ColorRow struct {
	XMLName xml.Name `xml:"Row"`
	Type    string   `xml:"Type"`
	Red     float64  `xml:"Red"`
	Green   float64  `xml:"Green"`
	Blue    float64  `xml:"Blue"`
	Alpha   float64  `xml:"Alpha"`
}

type ColorXMLFile

type ColorXMLFile struct {
	XMLName xml.Name `xml:"GameData"`
	Colors  Colors   `xml:"Colors"`
}

type Colors

type Colors struct {
	XMLName xml.Name   `xml:"Colors"`
	Rows    []ColorRow `xml:"Row"`
}

type PlayerColorRow

type PlayerColorRow struct {
	XMLName        xml.Name `xml:"Row"`
	Type           string   `xml:"Type"`
	PrimaryColor   string   `xml:"PrimaryColor"`
	SecondaryColor string   `xml:"SecondaryColor"`
	TextColor      string   `xml:"TextColor"`
}

type PlayerColorXMLFile

type PlayerColorXMLFile struct {
	XMLName      xml.Name     `xml:"GameData"`
	PlayerColors PlayerColors `xml:"PlayerColors"`
}

type PlayerColors

type PlayerColors struct {
	XMLName         xml.Name         `xml:"PlayerColors"`
	PlayerColorRows []PlayerColorRow `xml:"Row"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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