Skip to main content

Class BufferRgb444

Represents a 12bpp color pixel buffer

Assembly: MicroGraphics.dll
View Source
public class BufferRgb444 : PixelBufferBase, IPixelBuffer, IDisposable

Inheritance: System.Object -> Meadow.Foundation.Graphics.Buffers.PixelBufferBase

Implements:
Meadow.Foundation.Graphics.Buffers.IPixelBuffer, System.IDisposable

Properties

ColorMode

Color mode of the buffer

View Source
public override ColorMode ColorMode { get; }

Methods

GetPixel12bpp(int, int)

Get the pixel color

View Source
public ushort GetPixel12bpp(int x, int y)
Returns

System.UInt16: The pixel color as a 12bpp value

Parameters
TypeNameDescription
System.Int32xThe X pixel position
System.Int32yThe Y pixel position

GetPixel(int, int)

Get the pixel color

View Source
public override Color GetPixel(int x, int y)
Returns

Meadow.Color: The pixel color

Parameters
TypeNameDescription
System.Int32xThe X pixel position
System.Int32yThe Y pixel position

SetPixel(int, int, Color)

Set the pixel color

View Source
public override void SetPixel(int x, int y, Color color)
Parameters
TypeNameDescription
System.Int32xX pixel position
System.Int32yY pixel position
Meadow.ColorcolorThe pixel color

SetPixel(int, int, ushort)

Set the pixel color

View Source
public void SetPixel(int x, int y, ushort color)
Parameters
TypeNameDescription
System.Int32xX pixel position
System.Int32yY pixel position
System.UInt16colorThe pixel color packed as a 12 bpp ushort

Fill(Color)

Fill buffer with a color

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

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

Fill with a color

View Source
public override void Fill(int x, int y, int width, int height, Color color)
Parameters
TypeNameDescription
System.Int32xX start position in pixels
System.Int32yY start position in pixels
System.Int32widthWidth in pixels
System.Int32heightHeight in pixels
Meadow.ColorcolorThe fill color
Exceptions

System.ArgumentOutOfRangeException
Throws an exception if fill area is beyond the buffer bounds

InvertPixel(int, int)

Invert the pixel

View Source
public override void InvertPixel(int x, int y)
Parameters
TypeNameDescription
System.Int32xx position of pixel
System.Int32yy position of pixel

WriteBuffer(int, int, IPixelBuffer)

Write a buffer to specific location to the current buffer

View Source
public override void WriteBuffer(int x, int y, IPixelBuffer buffer)
Parameters
TypeNameDescription
System.Int32xx origin
System.Int32yy origin
Meadow.Foundation.Graphics.Buffers.IPixelBufferbufferbuffer to write

Implements