Skip to main content

Class GtkDisplay

Represents a GTK graphics display

Assembly: Gtk.dll
View Source
Declaration
public class GtkDisplay : IPixelDisplay, IDisplay, ITouchScreen

Implements:
Meadow.Peripherals.Displays.IPixelDisplay, Meadow.Peripherals.Displays.IDisplay, Meadow.Hardware.ITouchScreen

Properties

PixelBuffer

Provide a buffer that matches this display's color depth, height, and width This should be the buffer that is sent to the device when Show is called

View Source
Declaration
public IPixelBuffer PixelBuffer { get; }

ColorMode

The currently set color mode for the display

View Source
Declaration
public ColorMode ColorMode { get; }

Width

Width of the display in pixels

View Source
Declaration
public int Width { get; }

Height

Height of the display in pixels

View Source
Declaration
public int Height { get; }

SupportedColorModes

The Color mode supported by the display

View Source
Declaration
public ColorMode SupportedColorModes { get; }

Methods

Run()

Run the application

View Source
Declaration
public void Run()

Show()

Performs a full display update

View Source
Declaration
public void Show()

Show(int, int, int, int)

Partial screen update

View Source
Declaration
public void Show(int left, int top, int right, int bottom)
Parameters
TypeName
System.Int32left
System.Int32top
System.Int32right
System.Int32bottom

Clear(bool)

Clears the display buffer

View Source
Declaration
public void Clear(bool updateDisplay = false)
Parameters
TypeName
System.BooleanupdateDisplay

Fill(Color, bool)

Fills the entire display with a given color

View Source
Declaration
public void Fill(Color fillColor, bool updateDisplay = false)
Parameters
TypeName
Meadow.ColorfillColor
System.BooleanupdateDisplay

Fill(int, int, int, int, Color)

Fills a region with a given color

View Source
Declaration
public void Fill(int x, int y, int width, int height, Color fillColor)
Parameters
TypeName
System.Int32x
System.Int32y
System.Int32width
System.Int32height
Meadow.ColorfillColor

DrawPixel(int, int, Color)

Fills a pixel with a given color

View Source
Declaration
public void DrawPixel(int x, int y, Color color)
Parameters
TypeName
System.Int32x
System.Int32y
Meadow.Colorcolor

DrawPixel(int, int, bool)

Fills a pixel with either black or white

View Source
Declaration
public void DrawPixel(int x, int y, bool colored)
Parameters
TypeName
System.Int32x
System.Int32y
System.Booleancolored

InvertPixel(int, int)

Inverts the pixel at the given location

View Source
Declaration
public void InvertPixel(int x, int y)
Parameters
TypeName
System.Int32x
System.Int32y

WriteBuffer(int, int, IPixelBuffer)

Draws to the pixel buffer at a specified location

View Source
Declaration
public void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)
Parameters
TypeName
System.Int32x
System.Int32y
Meadow.Peripherals.Displays.IPixelBufferdisplayBuffer

Events

TouchDown

Event fired when the display gets a mouse down

View Source
Declaration
public event TouchEventHandler TouchDown
Event Type

Meadow.Hardware.TouchEventHandler

TouchUp

Event fired when the display gets a mouse up

View Source
Declaration
public event TouchEventHandler TouchUp
Event Type

Meadow.Hardware.TouchEventHandler

TouchClick

Event fired when the display gets a mouse click

View Source
Declaration
public event TouchEventHandler TouchClick
Event Type

Meadow.Hardware.TouchEventHandler

Implements

  • Meadow.Peripherals.Displays.IPixelDisplay
  • Meadow.Peripherals.Displays.IDisplay
  • Meadow.Hardware.ITouchScreen