RLE raster output. More...
Data Structures | |
struct | paint_position |
struct | RLE_RASTER_handle |
Macros | |
#define | RLE_FILEFORMAT "%f-%p%?-N%?-S.rle" |
The default file name format for files produced by the RLE file output back end. | |
#define | JSON_INDENT(level) JSON_INDENT##level |
#define | write_string(h, str) |
#define | write_literal(h, str) (theIWriteFile((h)->dev_op)((h)->dev_op, (h)->ofd, STRING_AND_LENGTH(str)) == CSTRING_LENGTH(str)) |
#define | write_field(handle, field, level) |
Typedefs | |
typedef struct paint_position | paint_position |
typedef struct RLE_RASTER_handle | RLE_RASTER_handle |
Functions | |
static RASTER_result | RLE_RASTER_finish (void *pJobContext, RASTER_handle *handlep, RasterDescription *pRasterDescription, RASTER_result result) |
Raster complete - close the output file, or delete it if there was an error. | |
static void | insert_handle (RLE_RASTER_handle *handle) |
static RLE_RASTER_handle * | find_handle (uintptr_t separation_id) |
static void | delete_handle (RLE_RASTER_handle *handle) |
static void | delete_output_file (RLE_RASTER_handle *handle) |
An error occurred during output - delete the output file. More... | |
static HqBool | close_file (RLE_RASTER_handle *handle) |
Close the output file, if open. More... | |
static HqBool | init_handle (RLE_RASTER_handle *handle, uint8 *filename, RasterDescription *rasterDescription) |
Initialise a pre-allocated RLE raster handle. More... | |
static HqBool | write_int32 (RLE_RASTER_handle *handle, int32 d) |
static HqBool | write_uint32 (RLE_RASTER_handle *handle, uint32 ud) |
static HqBool | write_float (RLE_RASTER_handle *handle, double fl) |
static HqBool | write_colorants (RLE_RASTER_handle *handle, RasterDescription *rd) |
static HqBool | write_trailer (RLE_RASTER_handle *handle) |
static RASTER_result | RLE_RASTER_start (void *pJobContext, RasterDescription *rasterDescription, RASTER_handle *handlep) |
Start a new raster; create the output file and write the header. | |
static RASTER_result | RLE_RASTER_write_data (void *pJobContext, RASTER_handle rh, RasterDescription *pRasterDescription, void *data, int32 topline, int32 lines, int32 bytesperline, int32 channel) |
Write a line of RLE data. | |
static RASTER_result | RLE_RASTER_job_end (void *pJobContext, RASTER_handle *handlep) |
Clean up at end of job. | |
HqBool | RLE_RegisterHandlers (void) |
Register the raster backend and event handlers. More... | |
Variables | |
static RLE_RASTER_handle * | handles = ((void*)0) |
RLE raster output.
This file implements a simple example RLE writer for the Harlequin RIP SDK.
#define JSON_INDENT | ( | level | ) | JSON_INDENT##level |
A string constant containing the indent for the given level of JSON.
#define write_field | ( | handle, | |
field, | |||
level | |||
) |
Write a JSON field name to the output file, with delimiters around it.
handle | The raster handle. |
field | The field name, a string in double quotes. |
level | The indentation level. |
#define write_literal | ( | h, | |
str | |||
) | (theIWriteFile((h)->dev_op)((h)->dev_op, (h)->ofd, STRING_AND_LENGTH(str)) == CSTRING_LENGTH(str)) |
Write a string constant to the output file.
#define write_string | ( | h, | |
str | |||
) |
Write a JSON string to the output file.
This should really do encoding, but for now, we rely on the strings not containing control chars or quotes.
typedef struct paint_position paint_position |
Storage for remembering the position of a paint.
typedef struct RLE_RASTER_handle RLE_RASTER_handle |
State structure for writing a separation.
|
static |
Close the output file, if open.
FALSE
on error.
|
static |
Delete handle from separation list.
|
static |
An error occurred during output - delete the output file.
handle |
|
static |
Find handle in separation list.
|
static |
Initialise a pre-allocated RLE raster handle.
handle | The raster handle to initialise. |
filename | The filename of the output file. |
rasterDescription | The raster descriptor. |
TRUE | The handle was initialised correctly. |
FALSE | The handle was not initialised due to an error. |
|
static |
Insert handle into separation list.
HqBool RLE_RegisterHandlers | ( | void | ) |
Register the raster backend and event handlers.
TRUE | if successful; |
FALSE | otherwise. |
|
static |
Write the JSON representation of the colorant array to the output file.
|
inlinestatic |
Write the given number in float format to the output file of the handle.
|
inlinestatic |
Write a signed number in decimal to the output file of the handle.
|
static |
Write the trailer and the offset line to the output file.
|
inlinestatic |
Write an unsigned number in decimal to the output file of the handle.
|
static |
List of current separation handles.