Characteristic Locus
Inheritance object PixelBufferBase > BufferRgb332
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 BufferRgb332 : PixelBufferBase, IPixelBuffer, IDisposable

Constructors

BufferRgb332()

Create a new BufferRgb332 object

Declaration
public BufferRgb332()

BufferRgb332(int, int)

Create a new BufferRgb332 object

Declaration
public BufferRgb332(int width, int height)

Parameters

Type Name Description
int width

The width in pixels

int height

The height in pixels

BufferRgb332(int, int, byte[])

Create a new BufferRgb332 object

Declaration
public BufferRgb332(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

GetPixel8bpp(int, int)

Get the pixel color

Declaration
public int GetPixel8bpp(int x, int y)

Parameters

Type Name Description
int x

The X pixel position

int y

The Y pixel position

Returns

Type Description
int

The pixel color as an 8bpp 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, byte)

Set the pixel to a shade of gray

Declaration
public void SetPixel(int x, int y, byte gray)

Parameters

Type Name Description
int x

X pixel position

int y

Y pixel position

byte gray

The pixel gray value

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