Function withContiguousPlanesInto
Visits several validated flat-contiguous source and destination planes in one synchronous callback. The callback is entered only after every plane has passed contiguous-layout validation; no partial execution occurs.
bool withContiguousPlanesInto(Source, Destination)(
scope const ref RasterView!Source source,
scope const(size_t)[] sourcePlanes,
scope ref WritableRasterView!Destination destination,
scope const(size_t)[] destinationPlanes,
scope const(Source)[][] sourceSlices,
scope Destination[][] destinationSlices,
scope nothrow @nogc @safe void delegate(scope const(Source)[][] sources, scope Destination[][] destinations) kernel
) nothrow @nogc @safe;
Example
Example rejecting an invalid contiguous read-plane request.
import raster;
RasterView!ubyte view;
assert(!withContiguousPlane!ubyte(view, 0, null));