Skip to main content

Class EPaperTriColorBase

Provide an interface for ePaper 3 color displays

Assembly: EPaper.dll
View Source
public abstract class EPaperTriColorBase : EPaperBase, ISpiPeripheral, IDisposable, IGraphicsDisplay

Inheritance: System.Object -> Meadow.Foundation.Displays.EPaperBase

Derived:
Meadow.Foundation.Displays.Epd4in2bV2, Meadow.Foundation.Displays.Il0373, Meadow.Foundation.Displays.Il0376F, Meadow.Foundation.Displays.Il0398, Meadow.Foundation.Displays.Il91874, Meadow.Foundation.Displays.Ssd1680, Meadow.Foundation.Displays.Ssd1681, Meadow.Foundation.Displays.Uc8151c

Implements:
Meadow.Hardware.ISpiPeripheral, System.IDisposable, Meadow.Foundation.Graphics.IGraphicsDisplay

Properties

EnabledColor

The color to draw when a pixel is enabled

View Source
public Color EnabledColor { get; }

DisabledColor

The color to draw when a pixel is disabled

View Source
public Color DisabledColor { get; }

IsBlackInverted

Is the black pixel data inverted

View Source
protected abstract bool IsBlackInverted { get; }

IsColorInverted

Is the color pixel data inverted

View Source
protected abstract bool IsColorInverted { get; }

ColorMode

Display color mode

View Source
public ColorMode ColorMode { get; }

SupportedColorModes

The Color mode supported by the display

View Source
public ColorMode SupportedColorModes { get; }

Width

Width of display in pixels

View Source
public virtual int Width { get; }

Height

Height of display in pixels

View Source
public virtual int Height { get; }

PixelBuffer

The pixel buffer - not directly accessible Use buffer.BlackBuffer and buffer.ColorBuffer to access byte arrays

View Source
public IPixelBuffer PixelBuffer { get; }

Fields

imageBuffer

The buffer the holds the black pixel data for the display

View Source
protected Buffer2bppEPaper imageBuffer

Methods

CreateBuffer(int, int)

Create an offscreen buffer for the display

View Source
protected virtual void CreateBuffer(int width, int height)
Parameters
TypeNameDescription
System.Int32widthThe width in pixels
System.Int32heightThe height in pixels

Initialize()

Initialize the display

View Source
protected abstract void Initialize()

Clear(bool)

Clear the display buffer

View Source
public void Clear(bool updateDisplay = false)
Parameters
TypeNameDescription
System.BooleanupdateDisplayUpdate the display if true

Fill(Color, bool)

Fill the display buffer with a color

View Source
public void Fill(Color color, bool updateDisplay = false)
Parameters
TypeNameDescription
Meadow.ColorcolorThe color - normalized to black, white or color
System.BooleanupdateDisplayRefresh the display if true

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

Fill a region of the display buffer with a color

View Source
public void Fill(int x, int y, int width, int height, Color color)
Parameters
TypeNameDescription
System.Int32xThe x location
System.Int32yThe y location
System.Int32widthThe width to fill in pixels
System.Int32heightThe height to fill in pixels
Meadow.ColorcolorThe color to fill - normalized to black, white or color

Clear(bool, bool)

Clear the display buffer

View Source
public void Clear(bool enabled, bool updateDisplay = false)
Parameters
TypeNameDescription
System.BooleanenabledIf true, fill with the enabled color (default is white)
System.BooleanupdateDisplayIf true, refresh the display

DrawPixel(int, int, bool)

Draw a pixel

View Source
public void DrawPixel(int x, int y, bool enabled)
Parameters
TypeNameDescription
System.Int32xThe x location in pixels
System.Int32yThe y location in pixels
System.BooleanenabledIf true, use the enabled color (default is white)

DrawBlackPixel(int, int, bool)

Draw a black pixel

View Source
public void DrawBlackPixel(int x, int y, bool enabled)
Parameters
TypeNameDescription
System.Int32xThe x location in pixels
System.Int32yThe y location in pixels
System.BooleanenabledIf true, use the enabled color (default is white)

InvertPixel(int, int)

Invert a pixel

View Source
public void InvertPixel(int x, int y)
Parameters
TypeNameDescription
System.Int32xThe x location in pixels
System.Int32yThe y location in pixels

DrawColoredPixel(int, int, bool)

Set a colored pixel (on or off)

View Source
public void DrawColoredPixel(int x, int y, bool isOn)
Parameters
TypeNameDescription
System.Int32xThe x pixel location
System.Int32yThe y pixel location
System.BooleanisOnTrue for on, false for off

DrawPixel(int, int, Color)

Draw a pixel

View Source
public void DrawPixel(int x, int y, Color color)
Parameters
TypeNameDescription
System.Int32xThe x pixel location
System.Int32yThe y pixel location
Meadow.ColorcolorThe pixel color

WriteBuffer(int, int, IPixelBuffer)

Write a buffer to the display buffer

View Source
public void WriteBuffer(int x, int y, IPixelBuffer displayBuffer)
Parameters
TypeNameDescription
System.Int32xThe x position in pixels to write the buffer
System.Int32yThe y position in pixels to write the buffer
Meadow.Foundation.Graphics.Buffers.IPixelBufferdisplayBufferThe buffer to write

SendCommand(Command)

Send a command to the display

View Source
protected void SendCommand(EPaperTriColorBase.Command command)
Parameters
TypeNameDescription
Meadow.Foundation.Displays.EPaperTriColorBase.CommandcommandThe command

Show()

Update the display

View Source
public virtual void Show()
Exceptions

System.NotImplementedException

Show(int, int, int, int)

Update a region of the display from the offscreen buffer

View Source
public virtual void Show(int left, int top, int right, int bottom)
Parameters
TypeNameDescription
System.Int32leftLeft bounds in pixels
System.Int32topTop bounds in pixels
System.Int32rightRight bounds in pixels
System.Int32bottomBottom bounds in pixels

Implements