Characteristic Locus
Inheritance object > Buffer2bppEPaper
Implements IPixelBuffer
Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.Graphics.Buffers
Assembly EPaper.dll

Syntax

public class Buffer2bppEPaper : IPixelBuffer

Constructors

Buffer2bppEPaper(int, int)

Create a new Buffer2bppEPaper object

Declaration
public Buffer2bppEPaper(int width, int height)

Parameters

Type Name Description
int width

the buffer width in pixels

int height

the buffer height in pixels

Properties

BitDepth

Bit depth of display as an integer

Declaration
public int BitDepth { get; }

Property Value

Type Description
int

BlackBuffer

The buffer for black pixels

Declaration
public byte[] BlackBuffer { get; }

Property Value

Type Description
byte[]

Buffer

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

Declaration
public byte[] Buffer { get; }

Property Value

Type Description
byte[]

ByteCount

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

Declaration
public int ByteCount { get; }

Property Value

Type Description
int

ColorBuffer

The buffer for color pixels

Declaration
public byte[] ColorBuffer { get; }

Property Value

Type Description
byte[]

ColorMode

Color mode of the buffer - 2 bit per pixel

Declaration
public ColorMode ColorMode { get; }

Property Value

Type Description
ColorMode

Height

Height of buffer in pixels

Declaration
public int Height { get; }

Property Value

Type Description
int

Width

Width of buffer in pixels

Declaration
public int Width { get; }

Property Value

Type Description
int

Methods

Clear()

Clear the buffer

Declaration
public void Clear()

Fill(Color)

Fill with a color

Declaration
public void Fill(Color color)

Parameters

Type Name Description
Color color

The fill color

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

Fill with a color

Declaration
public void Fill(int originX, int originY, int width, int height, Color color)

Parameters

Type Name Description
int originX

X start position in pixels

int originY

Y start position in pixels

int width

Width in pixels

int height

Height in pixels

Color color

The fill color

GetPixel(int, int)

Get the pixel color

Declaration
public Color GetPixel(int x, int y)

Parameters

Type Name Description
int x

The X pixel position

int y

The Y pixel position

Returns

Type Description
Color

The pixel color

InvertPixel(int, int)

Invert the pixel Not currently supported

Declaration
public void InvertPixel(int x, int y)

Parameters

Type Name Description
int x

x position of pixel

int y

y position of pixel

SetBlackPixel(int, int, bool)

Set a black pixel on or off

Declaration
public void SetBlackPixel(int x, int y, bool isOn)

Parameters

Type Name Description
int x

x location in pixels

int y

y location in pixels

bool isOn

true for on, false for off

SetColorPixel(int, int, bool)

Set a color pixel on or off

Declaration
public void SetColorPixel(int x, int y, bool isOn)

Parameters

Type Name Description
int x

x location in pixels

int y

y location in pixels

bool isOn

true for on, false for off

SetPixel(int, int, Color)

Set a pixel to a color

Declaration
public void SetPixel(int x, int y, Color color)

Parameters

Type Name Description
int x

x location in pixels

int y

y location in pixels

Color color

The color - will normalize to black, white or color

WriteBuffer(int, int, IPixelBuffer)

Write a buffer to the buffer

Declaration
public void WriteBuffer(int x, int y, IPixelBuffer buffer)

Parameters

Type Name Description
int x

The x position in pixels to write the buffer

int y

The y position in pixels to write the buffer

IPixelBuffer buffer

The buffer to write