Skip to main content

Class GtkDisplay

Represents a GTK graphics display

Assembly: Gtk.dll
View Source
public class GtkDisplay : IGraphicsDisplay, ITouchScreen

Implements:
Meadow.Foundation.Graphics.IGraphicsDisplay, 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
public IPixelBuffer PixelBuffer { get; }

ColorMode

Current color mode of display

View Source
public ColorMode ColorMode { get; }

Width

Width of the display, in pixels

View Source
public int Width { get; }

Height

Height of the display, in pixels

View Source
public int Height { get; }

SupportedColorModes

The color modes supported by the display

View Source
public ColorMode SupportedColorModes { get; }

Methods

Run()

Run the application

View Source
public void Run()

Show()

Performs a full display update

View Source
public void Show()

Show(int, int, int, int)

Partial screen update

View Source
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
public void Clear(bool updateDisplay = false)
Parameters
TypeName
System.BooleanupdateDisplay

Fill(Color, bool)

Fills the entire display with a given color

View Source
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
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
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
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
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
public void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)
Parameters
TypeName
System.Int32x
System.Int32y
Meadow.Foundation.Graphics.Buffers.IPixelBufferdisplayBuffer

Events

TouchDown

Event fired when the display gets a mouse down

View Source
public event TouchEventHandler TouchDown
Event Type

Meadow.Hardware.TouchEventHandler

TouchUp

Event fired when the display gets a mouse up

View Source
public event TouchEventHandler TouchUp
Event Type

Meadow.Hardware.TouchEventHandler

TouchClick

Event fired when the display gets a mouse click

View Source
public event TouchEventHandler TouchClick
Event Type

Meadow.Hardware.TouchEventHandler

Implements