diff options
author | Vincent Sanders <vince@kyllikki.org> | 2018-02-07 22:15:57 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2018-02-07 22:15:57 +0000 |
commit | d8835327fcc498795ac66bed330e741cef12ce29 (patch) | |
tree | 14b4f75f883b0ba43b2fbaaf42daba32c60c970c /src/graphics_state.h | |
parent | f022fe68dcb0703e01e6530263e3177ffec1c083 (diff) | |
download | libnspdf-d8835327fcc498795ac66bed330e741cef12ce29.tar.gz libnspdf-d8835327fcc498795ac66bed330e741cef12ce29.tar.bz2 |
implement colour setting operations in render
Diffstat (limited to 'src/graphics_state.h')
-rw-r--r-- | src/graphics_state.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/graphics_state.h b/src/graphics_state.h index ec158e0..e5cc2bf 100644 --- a/src/graphics_state.h +++ b/src/graphics_state.h @@ -29,16 +29,29 @@ struct graphics_state_color { enum graphics_state_colorspace space; union { float gray; /* default is 0 - black */ - float rgb[3]; - float cmyk[3]; - }; + struct { + float r; + float g; + float b; + } rgb; + struct { + float c; + float m; + float y; + float k; + } cmyk; + } u; }; struct graphics_state_param { float ctm[6]; /* current transform matrix */ /* clipping path */ - struct graphics_state_color stroke_colour; - struct graphics_state_color other_colour; + struct { + struct graphics_state_color colour; + } stroke; + struct { + struct graphics_state_color colour; + } other; /* text state */ float line_width; unsigned int line_cap; |