Class Buffer2bppGreyEPaper
Represents a 2bpp greysacle buffer This is specifically built for 4 color grayscale eInk displays and wraps two 1bpp buffers
Assembly: EPaper.dll
View Source
Declaration
public class Buffer2bppGreyEPaper : 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; }
LightBuffer
The buffer for light and dark grey pixels
View Source
Declaration
public byte[] LightBuffer { get; }
DarkBuffer
The buffer to darken pixels to light gray and black
View Source
Declaration
public byte[] DarkBuffer { 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
Type | Name | Description |
---|---|---|
Meadow.Color | color | The 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
Type | Name | Description |
---|---|---|
System.Int32 | originX | X start position in pixels |
System.Int32 | originY | Y start position in pixels |
System.Int32 | width | Width in pixels |
System.Int32 | height | Height in pixels |
Meadow.Color | color | The 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
Type | Name | Description |
---|---|---|
System.Int32 | x | The X pixel position |
System.Int32 | y | The Y pixel position |
InvertPixel(int, int)
Invert the pixel Not currently supported
View Source
Declaration
public void InvertPixel(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | x position of pixel |
System.Int32 | y | y position of pixel |
SetPixel(int, int, Color)
Set a pixel to a color
View Source
Declaration
public void SetPixel(int x, int y, Color color)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | x location in pixels |
System.Int32 | y | y location in pixels |
Meadow.Color | color | The 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
Type | Name | Description |
---|---|---|
System.Int32 | x | The x position in pixels to write the buffer |
System.Int32 | y | The y position in pixels to write the buffer |
Meadow.Peripherals.Displays.IPixelBuffer | buffer | The buffer to write |
Implements
Meadow.Peripherals.Displays.IPixelBuffer