Characteristic Locus
Inheritance object PixelBufferBase > BufferRgb444
Implements IPixelBuffer IDisposable
Inherited Members PixelBufferBase.Width PixelBufferBase.Height PixelBufferBase.BitDepth PixelBufferBase.ByteCount PixelBufferBase.Buffer PixelBufferBase.InitializeBuffer(bool) PixelBufferBase.Clear() PixelBufferBase.WriteBufferSlow(int, int, IPixelBuffer) PixelBufferBase.RotateAndConvert<T>(RotationType) PixelBufferBase.ScaleUp<T>(int) PixelBufferBase.ConvertPixelBuffer<T>() PixelBufferBase.GetColorDistance(Color, Color) PixelBufferBase.Dispose(bool) PixelBufferBase.Dispose() 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 MicroGraphics.dll

Syntax

public class BufferRgb444 : PixelBufferBase, IPixelBuffer, IDisposable

Constructors

BufferRgb444()

Create a new BufferRgb444 object

Declaration
public BufferRgb444()

BufferRgb444(int, int)

Create a new BufferRgb444 object

Declaration
public BufferRgb444(int width, int height)

Parameters

Type Name Description
int width

The width in pixels

int height

The height in pixels

BufferRgb444(int, int, byte[])

Create a new BufferRgb444 object

Declaration
public BufferRgb444(int width, int height, byte[] buffer)

Parameters

Type Name Description
int width

The width in pixels

int height

The height in pixels

byte[] buffer

The backing buffer

Properties

ColorMode

Color mode of the buffer

Declaration
public override ColorMode ColorMode { get; }

Property Value

Type Description
ColorMode

Overrides

Methods

Fill(Color)

Fill buffer with a color

Declaration
public override void Fill(Color color)

Parameters

Type Name Description
Color color

The fill color

Overrides

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

Fill with a color

Declaration
public override void Fill(int x, int y, int width, int height, Color color)

Parameters

Type Name Description
int x

X start position in pixels

int y

Y start position in pixels

int width

Width in pixels

int height

Height in pixels

Color color

The fill color

Overrides

Exceptions

Type Condition
ArgumentOutOfRangeException

Throws an exception if fill area is beyond the buffer bounds

GetPixel(int, int)

Get the pixel color

Declaration
public override 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

Overrides

GetPixel12bpp(int, int)

Get the pixel color

Declaration
public ushort GetPixel12bpp(int x, int y)

Parameters

Type Name Description
int x

The X pixel position

int y

The Y pixel position

Returns

Type Description
ushort

The pixel color as a 12bpp value

InvertPixel(int, int)

Invert the pixel

Declaration
public override void InvertPixel(int x, int y)

Parameters

Type Name Description
int x

x position of pixel

int y

y position of pixel

Overrides

SetPixel(int, int, Color)

Set the pixel color

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

Parameters

Type Name Description
int x

X pixel position

int y

Y pixel position

Color color

The pixel color

Overrides

SetPixel(int, int, ushort)

Set the pixel color

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

Parameters

Type Name Description
int x

X pixel position

int y

Y pixel position

ushort color

The pixel color packed as a 12 bpp ushort

WriteBuffer(int, int, IPixelBuffer)

Write a buffer to specific location to the current buffer

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

Parameters

Type Name Description
int x

x origin

int y

y origin

IPixelBuffer buffer

buffer to write

Overrides