Skip to main content

Class EPaperTriColorBase

Provide an interface for ePaper 3 color displays

Assembly: EPaper.dll​
View Source​
Declaration
public abstract class EPaperTriColorBase : EPaperBase, ISpiPeripheral, IDisposable, IPixelDisplay, IDisplay

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

Derived:
Meadow.Foundation.Displays.Epd4in2bV2

Implements:
Meadow.Hardware.ISpiPeripheral, System.IDisposable, Meadow.Peripherals.Displays.IPixelDisplay, Meadow.Peripherals.Displays.IDisplay

Properties​

EnabledColor​

The color to draw when a pixel is enabled

View Source​
Declaration
public Color EnabledColor { get; }

DisabledColor​

The color to draw when a pixel is disabled

View Source​
Declaration
public Color DisabledColor { get; }

IsBlackInverted​

Is the black pixel data inverted

View Source​
Declaration
protected abstract bool IsBlackInverted { get; }

IsColorInverted​

Is the color pixel data inverted

View Source​
Declaration
protected abstract bool IsColorInverted { get; }

ColorMode​

The currently set color mode for the display

View Source​
Declaration
public ColorMode ColorMode { get; }

SupportedColorModes​

The Color mode supported by the display

View Source​
Declaration
public ColorMode SupportedColorModes { get; }

Width​

Width of the display in pixels

View Source​
Declaration
public virtual int Width { get; }

Height​

Height of the display in pixels

View Source​
Declaration
public virtual int Height { get; }

PixelBuffer​

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

View Source​
Declaration
public IPixelBuffer PixelBuffer { get; }

Fields​

imageBuffer​

The buffer the holds the black pixel data for the display

View Source​
Declaration
protected Buffer2bppEPaper imageBuffer

Methods​

CreateBuffer(int, int)​

Create an offscreen buffer for the display

View Source​
Declaration
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​
Declaration
protected abstract void Initialize()

Clear(bool)​

Clear the display buffer

View Source​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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​
Declaration
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.Peripherals.Displays.IPixelBufferdisplayBufferThe buffer to write

SendCommand(Command)​

Send a command to the display

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

Show()​

Update the display

View Source​
Declaration
public virtual void Show()
Exceptions​

System.NotImplementedException

Show(int, int, int, int)​

Update a region of the display from the offscreen buffer

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

  • Meadow.Hardware.ISpiPeripheral
  • System.IDisposable
  • Meadow.Peripherals.Displays.IPixelDisplay
  • Meadow.Peripherals.Displays.IDisplay