Skip to main content

Interface IGraphicsDisplay

Represents a pixel based graphics display

Assembly: Meadow.Foundation.dll​
View Source​
Declaration
public interface IGraphicsDisplay

Properties​

ColorMode​

The currently set color mode for the display

View Source​
Declaration
ColorMode ColorMode { get; }

SupportedColorModes​

The Color mode supported by the display

View Source​
Declaration
ColorMode SupportedColorModes { get; }

Width​

Width of the display in pixels

View Source​
Declaration
int Width { get; }

Height​

Height of the display in pixels

View Source​
Declaration
int Height { get; }

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
IPixelBuffer PixelBuffer { get; }

EnabledColor​

The color to draw when a pixel is enabled

View Source​
Declaration
Color EnabledColor { get; }

DisabledColor​

The color to draw when a pixel is disabled

View Source​
Declaration
Color DisabledColor { get; }

Methods​

IsColorTypeSupported(ColorMode)​

Is the color mode supported on this display

View Source​
Declaration
bool IsColorTypeSupported(ColorMode mode)
Returns​

System.Boolean

Parameters​
TypeNameDescription
Meadow.Foundation.Graphics.ColorModemodeThe color mode

Show()​

Transfer the contents of the buffer to the display

View Source​
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

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

Clear(bool)​

Clear the display

View Source​
Declaration
void Clear(bool updateDisplay = false)
Parameters​
TypeNameDescription
System.BooleanupdateDisplayUpdate the display once the buffer has been cleared when true

Fill(Color, bool)​

Clear the display

View Source​
Declaration
void Fill(Color fillColor, bool updateDisplay = false)
Parameters​
TypeNameDescription
Meadow.ColorfillColorThe color used to fill the display buffer
System.BooleanupdateDisplayUpdate the display once the buffer has been cleared when true

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

Clear the display

View Source​
Declaration
void Fill(int x, int y, int width, int height, Color fillColor)
Parameters​
TypeNameDescription
System.Int32xx position in pixels
System.Int32yy position in pixels
System.Int32widthwidth to fill in pixels
System.Int32heightheight to fill in pixels
Meadow.ColorfillColorThe color used to fill the display buffer

DrawPixel(int, int, Color)​

Draw a single pixel at the specified color

View Source​
Declaration
void DrawPixel(int x, int y, Color color)
Parameters​
TypeNameDescription
System.Int32xx position in pixels
System.Int32yy position in pixels
Meadow.ColorcolorThe Meadow Foundation color of the pixel

DrawPixel(int, int, bool)​

Enable or disable a single pixel (used for 1bpp displays)

View Source​
Declaration
void DrawPixel(int x, int y, bool enabled)
Parameters​
TypeNameDescription
System.Int32xx position in pixels
System.Int32yy position in pixels
System.BooleanenabledOn if true, off if false

InvertPixel(int, int)​

Invert the color of a single pixel

View Source​
Declaration
void InvertPixel(int x, int y)
Parameters​
TypeNameDescription
System.Int32xx position in pixels
System.Int32yy position in pixels

WriteBuffer(int, int, IPixelBuffer)​

Draw a buffer to the display

View Source​
Declaration
void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)
Parameters​
TypeName
System.Int32x
System.Int32y
Meadow.Foundation.Graphics.Buffers.IPixelBufferdisplayBuffer