Documentation ¶
Index ¶
Constants ¶
View Source
const GameimgPrefix = "/gameimg/"
must end with /
Variables ¶
View Source
var BoardDrawers map[string]*BoardDrawer
View Source
var RenderMutex sync.Mutex
Functions ¶
func RenderImage ¶
func RenderImage(history *macondopb.GameHistory, wf WhichFile) ([]byte, error)
Types ¶
type BoardDrawer ¶
type BoardDrawer struct { Colors []color.Color // all *image.Paletted in this struct share this palette HeaderPalImg *image.Paletted Tile0Sprite map[byte]*image.Paletted // SubImage of the original tiles sprites Tile1Sprite map[byte]*image.Paletted BoardSprite map[rune]*image.Paletted TextXSprite map[rune]*image.Paletted Text0Sprite map[rune]*image.Paletted Text1Sprite map[rune]*image.Paletted BoardConfig [][]rune EmptyBoardPalImg *image.Paletted PadLeft int PadTop int PadRight int PadBottom int PadHeader int PadRack int RackGap int HeaderHeight int PadSpread int SpreadHeight int SpreadMax int PaddingColorIndex byte BackXColorIndex byte Back0ColorIndex byte Back1ColorIndex byte LetterDistribution *tilemapping.LetterDistribution }
type MementoService ¶
type MementoService struct {
// contains filtered or unexported fields
}
func NewMementoService ¶
func NewMementoService(u user.Store, gs gameplay.GameStore, gds *stores.GameDocumentStore, cfg *config.Config) *MementoService
func (*MementoService) GameimgEndpoint ¶
func (ms *MementoService) GameimgEndpoint(w http.ResponseWriter, r *http.Request, name string)
func (*MementoService) ServeHTTP ¶
func (ms *MementoService) ServeHTTP(w http.ResponseWriter, r *http.Request)
impl http.Handler
type TilePainterTilesMeta ¶
type TilePainterTilesMeta struct { TilesBytes []byte Tile0Src map[byte][2]int Tile1Src map[byte][2]int BoardSrc map[rune][2]int TextXSrc map[rune][2]int Text0Src map[rune][2]int Text1Src map[rune][2]int ExpDimXY [2]int BoardConfig [][]rune }
Content generated by /tile_images from the frontend.
Click to show internal directories.
Click to hide internal directories.