Skip to main content

Class Buffer2bppEPaper

Represents a 2bpp buffer This is specifically built for 3 color eInk displays and wraps two 1bpp buffers

Assembly: EPaper.dll
View Source
Declaration
public class Buffer2bppEPaper : IPixelBuffer

Implements:
Meadow.Peripherals.Displays.IPixelBuffer

Properties

Width

Width of buffer in pixels

View Source
Declaration
public int Width { get; }

Height

Height of buffer in pixels

View Source
Declaration
public int Height { get; }

ColorMode

The ColorMode of the pixel buffer

View Source
Declaration
public ColorMode ColorMode { get; }

BitDepth

Bit depth of display as an integer

View Source
Declaration
public int BitDepth { get; }

ByteCount

Number of bytes in buffer The totals the byte count from both internal 1bpp buffers

View Source
Declaration
public int ByteCount { get; }

Buffer

No direct access to a unified buffer Access BufferBlack and BufferColor instead

View Source
Declaration
public byte[] Buffer { get; }

BlackBuffer

The buffer for black pixels

View Source
Declaration
public byte[] BlackBuffer { get; }

ColorBuffer

The buffer for color pixels

View Source
Declaration
public byte[] ColorBuffer { get; }

Methods

Clear()

Clear the buffer

View Source
Declaration
public void Clear()

Fill(Color)

Fill with a color

View Source
Declaration
public void Fill(Color color)
Parameters
TypeNameDescription
Meadow.ColorcolorThe fill color

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

Fill with a color

View Source
Declaration
public void Fill(int originX, int originY, int width, int height, Color color)
Parameters
TypeNameDescription
System.Int32originXX start position in pixels
System.Int32originYY start position in pixels
System.Int32widthWidth in pixels
System.Int32heightHeight in pixels
Meadow.ColorcolorThe fill color

GetPixel(int, int)

Get the pixel color

View Source
Declaration
public Color GetPixel(int x, int y)
Returns

Meadow.Color: The pixel color

Parameters
TypeNameDescription
System.Int32xThe X pixel position
System.Int32yThe Y pixel position

InvertPixel(int, int)

Invert the pixel Not currently supported

View Source
Declaration
public void InvertPixel(int x, int y)
Parameters
TypeNameDescription
System.Int32xx position of pixel
System.Int32yy position of pixel

SetColorPixel(int, int, bool)

Set a color pixel on or off

View Source
Declaration
public void SetColorPixel(int x, int y, bool isOn)
Parameters
TypeNameDescription
System.Int32xx location in pixels
System.Int32yy location in pixels
System.BooleanisOntrue for on, false for off

SetBlackPixel(int, int, bool)

Set a black pixel on or off

View Source
Declaration
public void SetBlackPixel(int x, int y, bool isOn)
Parameters
TypeNameDescription
System.Int32xx location in pixels
System.Int32yy location in pixels
System.BooleanisOntrue for on, false for off

SetPixel(int, int, Color)

Set a pixel to a color

View Source
Declaration
public void SetPixel(int x, int y, Color color)
Parameters
TypeNameDescription
System.Int32xx location in pixels
System.Int32yy location in pixels
Meadow.ColorcolorThe color - will normalize to black, white or color

WriteBuffer(int, int, IPixelBuffer)

Write a buffer to the buffer

View Source
Declaration
public void WriteBuffer(int x, int y, IPixelBuffer buffer)
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.IPixelBufferbufferThe buffer to write

Implements

  • Meadow.Peripherals.Displays.IPixelBuffer