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
public class Buffer2bppEPaper : IPixelBuffer

Implements:
Meadow.Foundation.Graphics.Buffers.IPixelBuffer

Properties

Width

Width of buffer in pixels

View Source
public int Width { get; }

Height

Height of buffer in pixels

View Source
public int Height { get; }

ColorMode

Color mode of the buffer - 2 bit per pixel

View Source
public ColorMode ColorMode { get; }

BitDepth

Bit depth of display as an integer

View Source
public int BitDepth { get; }

ByteCount

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

View Source
public int ByteCount { get; }

Buffer

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

View Source
public byte[] Buffer { get; }

BlackBuffer

The buffer for black pixels

View Source
public byte[] BlackBuffer { get; }

ColorBuffer

The buffer for color pixels

View Source
public byte[] ColorBuffer { get; }

Methods

Clear()

Clear the buffer

View Source
public void Clear()

Fill(Color)

Fill with a color

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

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

Fill with a color

View Source
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
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
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
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
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
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
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.Foundation.Graphics.Buffers.IPixelBufferbufferThe buffer to write

Implements