(v13) Raster handling pfnRaster
This page applies to Harlequin v13.1r0 and later; and to Harlequin Core but not Harlequin MultiRIP.
When raster data becomes available from the RIP it is supplied a band at a time to the host application via the callback function *pfnRaster
, the function pointer operand to SwLeJobStart
. The raster data, pointed to by the callback function's pBuffer
parameter is described by pRasterDescription
(which among other things gives the number of color channels, their order, the image's size and band size).
If pfnRaster
is NULL
, raster data is still created, but is discarded.
The application needs to keep track of where the current band is in the overall image, because it needs to know when the raster is complete.
The last band of raster may be smaller than previous bands; therefore the host application must keep track of the remaining raster in the last band.
The data being pointed to by pRasterDescription
remain constant during the repeated calls to pfnRaster
. When the last band of raster is passed to the application, the RIP frees up pRasterDescription
, therefore the application must take care not to reference it after this point.
If the raster callback function returns false
, the RIP aborts the rendering of the page with an I/O error, and no more calls to pfnRaster
are made for that page.