1 | /*! |
2 | * \file path_enums.hpp |
3 | * \brief file path_enums.hpp |
4 | * |
5 | * Copyright 2018 by Intel. |
6 | * |
7 | * Contact: kevin.rogovin@gmail.com |
8 | * |
9 | * This Source Code Form is subject to the |
10 | * terms of the Mozilla Public License, v. 2.0. |
11 | * If a copy of the MPL was not distributed with |
12 | * this file, You can obtain one at |
13 | * http://mozilla.org/MPL/2.0/. |
14 | * |
15 | * \author Kevin Rogovin <kevin.rogovin@gmail.com> |
16 | * |
17 | */ |
18 | |
19 | #ifndef FASTUIDRAW_PATH_ENUMS_HPP |
20 | #define FASTUIDRAW_PATH_ENUMS_HPP |
21 | |
22 | namespace fastuidraw { |
23 | |
24 | /*!\addtogroup Paths |
25 | * @{ |
26 | */ |
27 | |
28 | /*! |
29 | * \brief |
30 | * Class to encapsulate enumerations used by \ref Path and |
31 | * \ref PathContour. |
32 | */ |
33 | class PathEnums |
34 | { |
35 | public: |
36 | /*! |
37 | * A type_t specifies if an interpolator_base is to be |
38 | * viewed as starting a new edge or continuing a previous |
39 | * edge. |
40 | */ |
41 | enum edge_type_t |
42 | { |
43 | /*! |
44 | * Indicates the start of a new edge, thus the meeting place |
45 | * between the edges is given a join whose style how to be |
46 | * drawn is controllable. |
47 | */ |
48 | starts_new_edge, |
49 | |
50 | /*! |
51 | * Indicates that the edge is a continuation of the previous |
52 | * edge. |
53 | */ |
54 | continues_edge, |
55 | }; |
56 | |
57 | /*! |
58 | * Enumeration to specify indexes into a \ref c_array |
59 | * on how much a path's geometry is inflated by stroking. |
60 | */ |
61 | enum path_geometry_inflation_index_t |
62 | { |
63 | /*! |
64 | * Index into \ref c_array to indicate how much |
65 | * the path geometry is inflated in pixels after its |
66 | * inflation in in item coordinates and having the current |
67 | * transformation matrix applied. |
68 | */ |
69 | pixel_space_distance = 0, |
70 | |
71 | /*! |
72 | * Index into \ref c_array to indicate how much |
73 | * the path geometry is inflated in path cordinates |
74 | * before the transformation matrix applied or the |
75 | * inflation by \ref pixel_space_distance is applied |
76 | */ |
77 | item_space_distance, |
78 | |
79 | /*! |
80 | * Index into \ref c_array to indicate how much |
81 | * the bounding box for taking miter-joins is inflated |
82 | * in pixels after its inflation in in item coordinates |
83 | * and having the current transformation matrix applied. |
84 | */ |
85 | pixel_space_distance_miter_joins, |
86 | |
87 | /*! |
88 | * Index into \ref c_array to indicate how much |
89 | * the bounding box for taking miter-joins is inflated |
90 | * in path cordinates before the transformation matrix |
91 | * applied or the inflation by \ref |
92 | * pixel_space_distance_miter_joins is applied |
93 | */ |
94 | item_space_distance_miter_joins, |
95 | |
96 | path_geometry_inflation_index_count, |
97 | }; |
98 | }; |
99 | /*! @} */ |
100 | |
101 | } |
102 | |
103 | #endif |
104 | |