FastUIDraw
glyph_generate_params.hpp
Go to the documentation of this file.
1 /*!
2  * \file glyph_generate_params.hpp
3  * \brief file glyph_generate_params.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_GLYPH_GENERATE_PARAMS_HPP
20 #define FASTUIDRAW_GLYPH_GENERATE_PARAMS_HPP
21 
22 #include <fastuidraw/util/util.hpp>
23 
24 namespace fastuidraw
25 {
26 /*!\addtogroup Glyph
27  * @{
28  */
29  /*!
30  * !\brief
31  * GlyphGenerateParams encapsulates values to determine how glyphs
32  * are to be produced. These values cannot be changed if
33  * there are any \ref FontBase derived objects alive.
34  */
35  namespace GlyphGenerateParams
36  {
37  /*!
38  * Pixel size at which to generate distance field scalable glyphs.
39  */
40  unsigned int
42 
43  /*!
44  * Set the value returned by distance_field_pixel_size(void) const,
45  * initial value is 48. Return \ref routine_success if value is
46  * successfully changed.
47  * \param v value
48  */
49  enum return_code
50  distance_field_pixel_size(unsigned int v);
51 
52  /*!
53  * When creating distance field data, the distances are normalized
54  * and clamped to [0, 1]. This value provides the normalization
55  * which effectivly gives the maximum distance recorded in the
56  * distance field texture. Recall that the values stored in texels
57  * are uint8_t's so larger values will have lower accuracy. The
58  * units are in pixels. Default value is 1.5.
59  */
60  float
62 
63  /*!
64  * Set the value returned by distance_field_max_distance(void) const,
65  * initial value is 96.0, i.e. 1.5 pixels. Return \ref routine_success
66  * if value is successfully changed.
67  * \param v value
68  */
69  enum return_code
71 
72  /*!
73  * When generating restricted rays glyph data see (\ref
74  * GlyphRenderDataRestrictedRays), specifies the expected
75  * smallest size on the scrren at which to render glyphs
76  * via a \ref GlyphRenderDataRestrictedRays. The value is
77  * used to include curves near the boundary of bounding box
78  * so that anti-aliasing works correctly when the glyph
79  * is renderer very small. A negative value indicates that
80  * no slack is taken/used.
81  */
82  float
84 
85  /*!
86  * Set the value returned by
87  * restricted_rays_minimum_render_size(void) const,
88  * initial value is 32.0. Returns \ref routine_success
89  * if value is successfully changed.
90  * \param v value
91  */
92  enum return_code
94 
95  /*!
96  * When generating restricted rays glyph data see (\ref
97  * GlyphRenderDataRestrictedRays), specifies the
98  * threshhold value for number of curves allowed in
99  * a single box before a box.
100  */
101  int
103 
104  /*!
105  * Set the value returned by
106  * restricted_rays_split_thresh(void) const,
107  * initial value is 4. Returns \ref routine_success
108  * if value is successfully changed.
109  * \param v value
110  */
111  enum return_code
113 
114  /*!
115  * When generating restricted rays glyph data see (\ref
116  * GlyphRenderDataRestrictedRays), specifies the
117  * maximum level of recursion that will be used to
118  * generate the hierarchy of boxes.
119  */
120  int
122 
123  /*!
124  * Set the value returned by
125  * restricted_rays_max_recursion(void) const,
126  * initial value is 12. Returns \ref routine_success
127  * if value is successfully changed.
128  * \param v value
129  */
130  enum return_code
132 
133  /*!
134  * When generating banded rays glyphs see (\ref
135  * GlyphRenderDataBandedRays), specifies the
136  * maximum number of times to recurse when
137  * generating sub-bands. The number of bands
138  * that are generated in a dimension is 2^N
139  * where N is the number of levels of recurion
140  * used to generate bands.
141  */
142  unsigned int
144 
145  /*!
146  * Set the value returned by
147  * banded_rays_max_recursion(void) const,
148  * initial value is 11. Returns \ref routine_success
149  * if value is successfully changed.
150  * \param v value
151  */
152  enum return_code
153  banded_rays_max_recursion(unsigned int v);
154 
155  /*!
156  * When generating banded rays glyphs see (\ref
157  * GlyphRenderDataBandedRays), specifies the
158  * threshhold for the average number of curves
159  * across bands to stop recursing to finer bands.
160  */
161  float
163 
164  /*!
165  * Set the value returned by
166  * banded_rays_average_number_curves_thresh(void) const,
167  * initial value is 2.5. Returns \ref routine_success
168  * if value is successfully changed.
169  * \param v value
170  */
171  enum return_code
173  }
174 }
175 
176 #endif
all classes and functions of FastUIDraw are in the namespace fastuidraw.
Definition: colorstop.hpp:28
float banded_rays_average_number_curves_thresh(void)
return_code
Enumeration for simple return codes for functions for success or failure.
Definition: util.hpp:142
unsigned int banded_rays_max_recursion(void)
unsigned int distance_field_pixel_size(void)
file util.hpp
float restricted_rays_minimum_render_size(void)