Documentation ¶
Index ¶
- type BlankCanvas
- func (i *BlankCanvas) AlwaysRender() bool
- func (i *BlankCanvas) At(x, y int) color.Color
- func (i *BlankCanvas) Bounds() image.Rectangle
- func (i *BlankCanvas) Clear() error
- func (i *BlankCanvas) Close() error
- func (i *BlankCanvas) ColorModel() color.Model
- func (i *BlankCanvas) Disable()
- func (i *BlankCanvas) Enable()
- func (i *BlankCanvas) Enabled() bool
- func (i *BlankCanvas) GetHTTPHandlers() ([]*HTTPHandler, error)
- func (i *BlankCanvas) Name() string
- func (i *BlankCanvas) Render(ctx context.Context) error
- func (i *BlankCanvas) Scrollable() bool
- func (i *BlankCanvas) Set(x, y int, clr color.Color)
- type Board
- type Canvas
- type Enabler
- type HTTPHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlankCanvas ¶ added in v0.0.14
BlankCanvas is a board.Canvas type that does not render
func NewBlankCanvas ¶ added in v0.0.14
func NewBlankCanvas(width int, height int, logger *zap.Logger) *BlankCanvas
NewBlankCanvas ...
func (*BlankCanvas) AlwaysRender ¶ added in v0.0.29
func (i *BlankCanvas) AlwaysRender() bool
AlwaysRender ...
func (*BlankCanvas) At ¶ added in v0.0.14
func (i *BlankCanvas) At(x, y int) color.Color
At returns the color of the pixel at (x, y)
func (*BlankCanvas) Bounds ¶ added in v0.0.14
func (i *BlankCanvas) Bounds() image.Rectangle
Bounds return the topology of the Canvas
func (*BlankCanvas) Clear ¶ added in v0.0.14
func (i *BlankCanvas) Clear() error
Clear sets the canvas to all black
func (*BlankCanvas) ColorModel ¶ added in v0.0.14
func (i *BlankCanvas) ColorModel() color.Model
ColorModel returns the canvas' color model, always color.RGBAModel
func (*BlankCanvas) GetHTTPHandlers ¶ added in v0.0.14
func (i *BlankCanvas) GetHTTPHandlers() ([]*HTTPHandler, error)
GetHTTPHandlers ...
func (*BlankCanvas) Render ¶ added in v0.0.14
func (i *BlankCanvas) Render(ctx context.Context) error
Render stores the state of the image as a PNG
func (*BlankCanvas) Scrollable ¶ added in v0.0.29
func (i *BlankCanvas) Scrollable() bool
Scrollable ...
type Board ¶
type Board interface { Enabler Name() string Render(ctx context.Context, canvases Canvas) error GetHTTPHandlers() ([]*HTTPHandler, error) ScrollMode() bool GetRPCHandler() (string, http.Handler) }
Board is the interface to implement for displaying on the matrix
type Canvas ¶ added in v0.0.7
type Canvas interface { image.Image draw.Image Enabler Name() string Clear() error Render(ctx context.Context) error GetHTTPHandlers() ([]*HTTPHandler, error) Close() error Scrollable() bool AlwaysRender() bool }
Canvas ...
type Enabler ¶ added in v0.0.8
type Enabler interface { Enabled() bool Enable() Disable() }
Enabler is an interface for basic Enable/Disable functions
type HTTPHandler ¶
type HTTPHandler struct { Handler func(http.ResponseWriter, *http.Request) Path string }
HTTPHandler is the type returned to the sportsmatrix for HTTP endpoints
Click to show internal directories.
Click to hide internal directories.