Documentation ¶
Overview ¶
Package imagescreen implements a fake screen (actually, an image) that can be used for testing the tilegraphics package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBufferSizeMismatch is returned when the size of the buffer passed to // FillRectangleWithBuffer doesn't match the to-be-updated area. ErrBufferSizeMismatch = errors.New("imagescreen: buffer size did not match width*height") )
Functions ¶
This section is empty.
Types ¶
type Screen ¶
Screen is a wrapper around an image, to implement the tilegraphics Displayer interface. It is used for testing.
func NewScreen ¶
NewScreen returns an in-memory memory buffer that acts as a screen, implementing the Displayer interface.
func (*Screen) Display ¶
Display implements the Displayer interface but is a no-op: data is stored directly to the image.
func (*Screen) FillRectangle ¶
FillRectangle fills the given rectangle with the given color.
func (*Screen) FillRectangleWithBuffer ¶
FillRectangleWithBuffer fills the given rectangle with a slice of colors. The buffer must be in row major order.
Click to show internal directories.
Click to hide internal directories.