Characteristic | Locus |
---|---|
Namespace | Meadow.Foundation.Graphics |
Assembly | Meadow.Foundation.dll |
Syntax
public interface IGraphicsDisplay
Properties
ColorMode
The currently set color mode for the display
Declaration
ColorMode ColorMode { get; }
Property Value
Type | Description |
---|---|
ColorMode |
DisabledColor
The color to draw when a pixel is disabled
Declaration
Color DisabledColor { get; }
Property Value
Type | Description |
---|---|
Color |
EnabledColor
The color to draw when a pixel is enabled
Declaration
Color EnabledColor { get; }
Property Value
Type | Description |
---|---|
Color |
Height
Height of the display in pixels
Declaration
int Height { get; }
Property Value
Type | Description |
---|---|
int |
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
Declaration
IPixelBuffer PixelBuffer { get; }
Property Value
Type | Description |
---|---|
IPixelBuffer |
SupportedColorModes
The Color mode supported by the display
Declaration
ColorMode SupportedColorModes { get; }
Property Value
Type | Description |
---|---|
ColorMode |
Width
Width of the display in pixels
Declaration
int Width { get; }
Property Value
Type | Description |
---|---|
int |
Methods
Clear(bool)
Clear the display
Declaration
void Clear(bool updateDisplay = false)
Parameters
Type | Name | Description |
---|---|---|
bool | updateDisplay | Update the dipslay once the buffer has been cleared when true |
DrawPixel(int, int, Color)
Draw a single pixel at the specified color
Declaration
void DrawPixel(int x, int y, Color color)
Parameters
Type | Name | Description |
---|---|---|
int | x | x position in pixels |
int | y | y position in pixels |
Color | color | The Meadow Foundation color of the pixel |
DrawPixel(int, int, bool)
Enable or disable a single pixel (used for 1bpp displays)
Declaration
void DrawPixel(int x, int y, bool enabled)
Parameters
Type | Name | Description |
---|---|---|
int | x | x position in pixels |
int | y | y position in pixels |
bool | enabled | On if true, off if false |
Fill(Color, bool)
Clear the display
Declaration
void Fill(Color fillColor, bool updateDisplay = false)
Parameters
Type | Name | Description |
---|---|---|
Color | fillColor | The color used to fill the display buffer |
bool | updateDisplay | Update the dipslay once the buffer has been cleared when true |
Fill(int, int, int, int, Color)
Clear the display
Declaration
void Fill(int x, int y, int width, int height, Color fillColor)
Parameters
Type | Name | Description |
---|---|---|
int | x | x position in pixels |
int | y | y position in pixels |
int | width | width to fill in pixels |
int | height | height to fill in pixels |
Color | fillColor | The color used to fill the display buffer |
InvertPixel(int, int)
Invert the color of a single pixel
Declaration
void InvertPixel(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
int | x | x position in pixels |
int | y | y position in pixels |
IsColorTypeSupported(ColorMode)
Is the color mode supported on this display
Declaration
bool IsColorTypeSupported(ColorMode mode)
Parameters
Type | Name | Description |
---|---|---|
ColorMode | mode | The color mode |
Returns
Type | Description |
---|---|
bool |
Show()
Transfer the contents of the buffer to the display
Declaration
void Show()
Show(int, int, int, int)
Transfer part of the contents of the buffer to the display bounded by left, top, right and bottom
Declaration
void Show(int left, int top, int right, int bottom)
Parameters
Type | Name | Description |
---|---|---|
int | left | |
int | top | |
int | right | |
int | bottom |
WriteBuffer(int, int, IPixelBuffer)
Draw a buffer to the display
Declaration
void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)
Parameters
Type | Name | Description |
---|---|---|
int | x | |
int | y | |
IPixelBuffer | displayBuffer |