Struct RasterPlaneRow
A callback-scoped row view of a validated affine plane.
struct RasterPlaneRow(T);
Methods
| Name | Description |
|---|---|
data
()
|
Returns the first sample of this callback-scoped row. |
Example
Example referring to the scoped read-window load operation.
import raster;
RasterPlaneWindow!ubyte window;
static assert(is(typeof(window .load(0, 0)) == ubyte));
Example
Example declaring a scoped read window value.
import raster;
RasterPlaneWindow!ubyte window;
assert(window .width == 0);
assert(window .height == 0);
Example
A strided row exposes its validated data pointer and element stride.
import raster;
ubyte[4] values = [1, 2, 3, 4];
auto row = RasterPlaneRow!ubyte(cast(const(ubyte)*) values .ptr, 2, 2);
assert(row .length == 2);
assert(row .sampleStride == 2);
assert(row .data[0] == 1);
assert(row .data[row .sampleStride] == 3);