libart-paperback 0.1.0-a.1.20260122225059.e5fea306241a
PDF (1.4) library for C++
graphics-state.hxx
1#ifndef art__paperback__internals__graphics_state_hxx_
2#define art__paperback__internals__graphics_state_hxx_
3
4#include <art/paperback/types.hxx>
5
6#include <art/paperback/graphics/color.hxx>
7#include <art/paperback/graphics/font.hxx>
8
10{
11
12 struct Matrix
13 {
14 double a;
15 double b;
16 double c;
17 double d;
18 double e;
19 double f;
20
21 };
22
23 Matrix
24 apply(Matrix const&, Matrix const&);
25
26 enum class Text_rendering_mode
27 {
28 fill,
29 stroke,
30 fill_then_stroke,
31 invisble,
32 fill_clippping,
33 stroke_clipping,
34 fill_stroke_clipping,
35 clipping
36
37 };
38
39 enum class Line_cap_style
40 {
41 butt_end,
42 round_end,
43 projecting_square_end
44
45 };
46
47 enum class Line_join_style
48 {
49 miter_join,
50 round_join,
51 bevel_join
52
53 };
54
56 {
57 Matrix ctm;
58
61
62 Graphics::Color_RGB rgb_stroke;
63 Graphics::Color_RGB rgb_fill;
64
65 double grey_stroke{};
66 double grey_fill{};
67
68 double text_cspace{};
69 double text_hspace{};
70 double text_hscale{};
71 double text_leading{};
72 Graphics::Font* current_font{};
73 double font_size{};
74 Text_rendering_mode text_rendering_mode{};
75 double ts_rise{};
76
77 double line_width{1.0};
78 Line_cap_style line_cap{};
79 Line_join_style line_join{};
80 double miter_limit{10.0};
81 double flatness{1.0};
82
83 };
84
85} // namespace Art::Paperback::Internals
86
87#endif
Represents an RGB color value.
Definition color.hxx:26
Base class for fonts.
Definition font.hxx:31
Color_space
PDF color space enumeration.
Definition color.hxx:12
@ device_grey
Device grey.
Definition color.hxx:15
Internal namespace.
Definition forward.hxx:91
Definition graphics-state.hxx:56
Definition graphics-state.hxx:13