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
virtual Color DisabledColor { get; }

Property Value

Type Description
Color

EnabledColor

The color to draw when a pixel is enabled

Declaration
virtual Color EnabledColor { get; }

Property Value

Type Description
Color

Height

Height of the display in pixels

Declaration
int Height { get; }

Property Value

Type Description
System.Int32

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
System.Int32

Methods

Clear(Boolean)

Clear the display

Declaration
void Clear(bool updateDisplay = false)

Parameters

Type Name Description
System.Boolean updateDisplay

Update the dipslay once the buffer has been cleared when true

DrawPixel(Int32, Int32, Color)

Draw a single pixel at the specified color

Declaration
void DrawPixel(int x, int y, Color color)

Parameters

Type Name Description
System.Int32 x

x position in pixels

System.Int32 y

y position in pixels

Color color

The Meadow Foundation color of the pixel

DrawPixel(Int32, Int32, Boolean)

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

Declaration
void DrawPixel(int x, int y, bool enabled)

Parameters

Type Name Description
System.Int32 x

x position in pixels

System.Int32 y

y position in pixels

System.Boolean enabled

On if true, off if false

Fill(Color, Boolean)

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

System.Boolean updateDisplay

Update the dipslay once the buffer has been cleared when true

Fill(Int32, Int32, Int32, Int32, Color)

Clear the display

Declaration
void Fill(int x, int y, int width, int height, Color fillColor)

Parameters

Type Name Description
System.Int32 x

x position in pixels

System.Int32 y

y position in pixels

System.Int32 width

width to fill in pixels

System.Int32 height

height to fill in pixels

Color fillColor

The color used to fill the display buffer

InvertPixel(Int32, Int32)

Invert the color of a single pixel

Declaration
void InvertPixel(int x, int y)

Parameters

Type Name Description
System.Int32 x

x position in pixels

System.Int32 y

y position in pixels

IsColorTypeSupported(ColorMode)

Is the color mode supported on this display

Declaration
virtual bool IsColorTypeSupported(ColorMode mode)

Parameters

Type Name Description
ColorMode mode

The color mode

Returns

Type Description
System.Boolean

Show()

Transfer the contents of the buffer to the display

Declaration
void Show()

Show(Int32, Int32, Int32, Int32)

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
System.Int32 left
System.Int32 top
System.Int32 right
System.Int32 bottom

WriteBuffer(Int32, Int32, IPixelBuffer)

Draw a buffer to the display

Declaration
void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)

Parameters

Type Name Description
System.Int32 x
System.Int32 y
IPixelBuffer displayBuffer