tinygo.org/x/drivers@v0.27.1-0.20240509133757-7dbca2a54349/displayer.go (about)

     1  package drivers
     2  
     3  import "image/color"
     4  
     5  type Displayer interface {
     6  	// Size returns the current size of the display.
     7  	Size() (x, y int16)
     8  
     9  	// SetPizel modifies the internal buffer.
    10  	SetPixel(x, y int16, c color.RGBA)
    11  
    12  	// Display sends the buffer (if any) to the screen.
    13  	Display() error
    14  }
    15  
    16  // Rotation is how much a display has been rotated. Displays can be rotated, and
    17  // sometimes also mirrored.
    18  type Rotation uint8
    19  
    20  // Clockwise rotation of the screen.
    21  const (
    22  	Rotation0 = iota
    23  	Rotation90
    24  	Rotation180
    25  	Rotation270
    26  	Rotation0Mirror
    27  	Rotation90Mirror
    28  	Rotation180Mirror
    29  	Rotation270Mirror
    30  )