Raster layout iterator. More...
#include "swraster.h"
Raster layout iterator.
The general pattern for raster layout iteration is to initialize an iterator structure to {layout}, and then call raster_layout_iterate() in the condition test of a loop, with flags indicating what items of interest in the raster layout hierarchy to stop at. At each stop in the iterator, all of the levels in the iteration that were requested are set to the next item in the layout. All levels below the requested level are set to the first contained item in the requested level (so advancing to the next sheet will set up the iterator for the first frame, plane, channel, and colorant of that sheet, irregardless of the separation omission status of those items). Successive calls to raster_layout_iterate() can change the levels in the structure to stop at next. It is also permissible to start iteration at a particular location by initializing higher levels of the iterator to a particular sheet, frame, plane, or channel, leaving lower levels NULL
, and then calling raster_layout_iterate() with flags set appropriately. It is also valid to copy an iterator, and use the copy to continue iterating from a location in the raster layout hierarchy with a different set of flags.