27 lines
374 B
Go
27 lines
374 B
Go
package hardware
|
|
|
|
import (
|
|
"image"
|
|
"image/color"
|
|
"image/draw"
|
|
)
|
|
|
|
// Display driver.
|
|
type Display interface {
|
|
Driver
|
|
|
|
// Draw an image on the display.
|
|
Draw(r image.Rectangle, src image.Image, sp image.Point) error
|
|
|
|
// Size of the display.
|
|
Size() image.Point
|
|
|
|
// Fill with one color.
|
|
Fill(color.Color) error
|
|
|
|
// Refresh the display.
|
|
Refresh() error
|
|
|
|
draw.Image
|
|
}
|