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
Type | Name |
---|---|
System.Int32 | left |
System.Int32 | top |
System.Int32 | right |
System.Int32 | bottom |
Clear(bool)
Clears the display buffer
View Source
public void Clear(bool updateDisplay = false)
Parameters
Type | Name |
---|---|
System.Boolean | updateDisplay |
Fill(Color, bool)
Fills the entire display with a given color
View Source
public void Fill(Color fillColor, bool updateDisplay = false)
Parameters
Type | Name |
---|---|
Meadow.Color | fillColor |
System.Boolean | updateDisplay |
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
Type | Name |
---|---|
System.Int32 | x |
System.Int32 | y |
System.Int32 | width |
System.Int32 | height |
Meadow.Color | fillColor |
DrawPixel(int, int, Color)
Fills a pixel with a given color
View Source
public void DrawPixel(int x, int y, Color color)
Parameters
Type | Name |
---|---|
System.Int32 | x |
System.Int32 | y |
Meadow.Color | color |
DrawPixel(int, int, bool)
Fills a pixel with either black or white
View Source
public void DrawPixel(int x, int y, bool colored)
Parameters
Type | Name |
---|---|
System.Int32 | x |
System.Int32 | y |
System.Boolean | colored |
InvertPixel(int, int)
Inverts the pixel at the given location
View Source
public void InvertPixel(int x, int y)
Parameters
Type | Name |
---|---|
System.Int32 | x |
System.Int32 | y |
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
Type | Name |
---|---|
System.Int32 | x |
System.Int32 | y |
Meadow.Foundation.Graphics.Buffers.IPixelBuffer | displayBuffer |
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
- Meadow.Foundation.Graphics.IGraphicsDisplay
Meadow.Hardware.ITouchScreen