CAPS Universe documentation
1.0.4
All you need to know to be successful
|
Used everywhere in the CAPS universe. More...
Data Structures | |
struct | caps_rect |
Defines a simple rectangle by its width and length in floating point values. More... | |
struct | caps_area |
Defines an area by its left bottom and right top coordinates in floating point values. More... | |
struct | caps_dot_monochrome |
1 bit per component, 8 dots per byte, MSbit is on the left (bit 7). More... | |
struct | caps_dot_grey |
One byte per component, one component per dot. More... | |
struct | caps_dot_rgb |
One byte per component, three components per dot: RGBRGB... More... | |
struct | caps_dot_cmyk |
One byte per component, four components per dot: CMYKCMYK... More... | |
Macros | |
#define | CAPS_INVALID_IDENTIFIER (INT64_C(-1)) |
#define | CAPS_REC_IS_EMPTY(x) ((x.width == 0.0) && (x.length == 0.0)) |
Typedefs | |
typedef int64_t | caps_identifier |
Enumerations | |
enum | caps_colour_format { CAPS_CF_NONE = 0 , CAPS_CF_MONOCHROME0 = 1 , CAPS_CF_MONOCHROME1 = 2 , CAPS_CF_GREY = 4 , CAPS_CF_RGB = 8 , CAPS_CF_CMYK = 16 } |
Dot colour format definition. More... | |
One reason to collect them here is to enable printer drivers to link only against one library instead of many. Some declarations used everywhere and should be set in one central file to avoid library specific re-declarations all over the CAPS universe.
#define CAPS_INVALID_IDENTIFIER (INT64_C(-1)) |
A default value to define a (yet) invalid identifier (refer caps_identifier). It is simply negative.
#define CAPS_REC_IS_EMPTY | ( | x | ) | ((x.width == 0.0) && (x.length == 0.0)) |
A simple macro to check if the rectangle in caps_rect is empty.
It only works reliable, if both axis are set to 0.0 explicitly.
typedef int64_t caps_identifier |
A base identifier type for general purpose. For printf() use "PRId64" in the format string or %jd
and the (intmax_t) cast
enum caps_colour_format |
Each colour format comes with one bit to be able to combine them (for negotiation for example)
Enumerator | |
---|---|
CAPS_CF_NONE | Undefined colour mode, e.g. uninitialized marker |
CAPS_CF_MONOCHROME0 | black/white, 1 bit per dot, 8 dots per byte, MSB is the left one, '0' = dot |
CAPS_CF_MONOCHROME1 | black/white, 1 bit per dot, 8 dots per byte, MSB is the left one, '1' = dot |
CAPS_CF_GREY | Grey scale, refer caps_dot_grey for the layout |
CAPS_CF_RGB | RGB colours, refer caps_dot_rgb for the layout |
CAPS_CF_CMYK | CMYK colours, refer caps_dot_cmyk for the layout |