PixelSpace

public sealed class PixelSpace
Provides fast mapping between pixel coordinates and bitnap array offsets.

Constructors

PixelSpace

#
Constuct a new coordinate mapper.
public PixelSpace(
BitmapData
data
Data to construct from.
)

Properties

Height

#
Gets the height of the bitmap (in pixels).
public int Height { get; }

LineSize

#
Gets the number of bytes for every line in the bitmap.
public int LineSize { get; }

PixelSize

#
Gets the number of bytes per pixel.
public int PixelSize { get; }

Width

#
Gets the width of the bitmap (in pixels).
public int Width { get; }

Methods

IndexCoordinates

#
Gets the pixel coordinates associated with the specific byte offset. This function does not perform any bounds checking.
public void IndexCoordinates(
index,
Index to offset.
out int
x,
Associated x coordinate.
out int
y
Associated y coordinate.
)

Offset

#
Gets the byte offset for the given x, y coordinate. This function does not perform any bounds checking.
public int Offset(
x,
X coordinate.
y
Y coordinate.
)
Offset. Number of bytes from the bitmap data start.