From 772a1044c47dab0f38ee51c474feddc1481ad075 Mon Sep 17 00:00:00 2001 From: Daniel Esteban Date: Wed, 24 Apr 2019 18:56:49 +0200 Subject: [PATCH] Define common display interface (#31) * issue #27 definition of Displayer interface --- displayer.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 displayer.go diff --git a/displayer.go b/displayer.go new file mode 100644 index 0000000..9b27b50 --- /dev/null +++ b/displayer.go @@ -0,0 +1,14 @@ +package drivers + +import "image/color" + +type Displayer interface { + // Size returns the current size of the display. + Size() (x, y int16) + + // SetPizel modifies the internal buffer. + SetPixel(x, y int16, c color.RGBA) + + // Display sends the buffer (if any) to the screen. + Display() error +}