An instance structure for the modular halftone API implementation. More...
#include "swhtm.h"
Data Fields | |
const sw_htm_api * | implementation |
Pointer to the API implementation. More... | |
sw_memory_instance * | mem |
A memory allocator instance. More... | |
unsigned int | src_bit_depth |
The source (contone) raster bit depth this instance requires. | |
HqBool | want_object_map |
Whether screening this instance needs the object properties map provided in calls to sw_htm_api::DoHalftone(). More... | |
HqBool | interrelated_channels |
Whether the halftone demands interrelated color channels. More... | |
unsigned int | num_src_channels |
The number of source (contone) raster channels the RIP must pass to the screening module with each call to sw_htm_api::DoHalftone(). Ignored unless interrelated_channels is TRUE . | |
unsigned int | num_dst_channels |
The number of destination (halftone) raster channels the RIP must pass to the screening module with each call to sw_htm_api::DoHalftone(). Ignored unless interrelated_channels is TRUE . | |
HqBool | process_empty_bands |
Set this to TRUE if sw_htm_api::DoHalftone() must be called even when there are no pixels to be processed, i.e., the mask bitmap is all zeroes. If this is FALSE , the RIP will skip the call to sw_htm_api::DoHalftone() whenever it can. | |
unsigned int | latency |
The number of previous bands that are needed by the screening algorithm. More... | |
sw_message_fn * | Message |
A function to output a message to the RIP's monitor device. More... | |
unsigned int | src_values_per_component |
The number of color values for each component of the source raster. | |
An instance structure for the modular halftone API implementation.
This is the definition of a modular halftone instance. The RIP allocates memory for the instances, calling the sw_htm_api::HalftoneSelect() method to complete the details. The RIP uses this value in calls to sw_htm_api::DoHalftone() and sw_htm_api::HalftoneRelease(), to tell the module which halftone is being referred to.
The instance structure may be subclassed to hold private data by defining a subclass structure containing this structure as its first member, and using the size of that structure as the implementation's instance size. Individual methods may then downcast their instance pointer parameters to subclass pointers, and use the private data. e.g.,
The RIP will not touch memory beyond the size of the instance structure for the implementation version registered.
const sw_htm_api* sw_htm_instance::implementation |
Pointer to the API implementation.
API methods for a halftone instance should always be called by indirecting through the instance's implementation field.
This field is filled in by the RIP before sw_htm_api::HalftoneSelect() is called.
HqBool sw_htm_instance::interrelated_channels |
Whether the halftone demands interrelated color channels.
Setting this to TRUE
means that the screening module needs the RIP to screen several channels at once in each single call to sw_htm_api::DoHalftone() that uses this halftone instance. This must be FALSE
for frame-interleaved output.
FALSE
at present, because the RIP does not yet support interrelated channel screening. unsigned int sw_htm_instance::latency |
The number of previous bands that are needed by the screening algorithm.
The destination rasters for these will be available during sw_htm_api::DoHalftone() at the addresses that they were earlier presented at (so the module needs to remember dst_channels
from earlier calls). The other buffers from earlier calls will not be available (but the module might store some of that data in its own buffers). If the algorithm just works on the current band, specify 0.
sw_memory_instance* sw_htm_instance::mem |
A memory allocator instance.
This object is supplied by the RIP so that the halftone implementation can allocate memory using the RIP's memory allocator. halftone implementations should use this in preference to malloc() and free(), so that the RIP can track memory allocation and respond to low memory states more effectively.
This field is filled in by the RIP before sw_htm_api::HalftoneSelect() is called.
sw_message_fn* sw_htm_instance::Message |
A function to output a message to the RIP's monitor device.
The length is limited to 1000 bytes including the zero terminator byte. End the message with a newline (\n
) to avoid the next message (possibly from a different thread) being stuck to the end of it.
HqBool sw_htm_instance::want_object_map |
Whether screening this instance needs the object properties map provided in calls to sw_htm_api::DoHalftone().
If this is FALSE
, the sw_htm_dohalftone_request::object_props_map field of the structure passed to sw_htm_api::DoHalftone() will always be NULL
.