Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
Glyph05FreeSerifBoldItalic_ae.hpp
Go to the documentation of this file.
1/*
2 * Author: Sven Gothel <sgothel@jausoft.com>
3 * Copyright Gothel Software e.K.
4 *
5 * SPDX-License-Identifier: MIT
6 *
7 * This Source Code Form is subject to the terms of the MIT License
8 * If a copy of the MIT was not distributed with this file,
9 * you can obtain one at https://opensource.org/license/mit/.
10 */
11
12#ifndef GAMP_DEMOS_GRAPH_TESTSHAPES_GLYPH05FSBI_AE_HPP_
13#define GAMP_DEMOS_GRAPH_TESTSHAPES_GLYPH05FSBI_AE_HPP_
14
16#include <jau/debug.hpp>
17
18/**
19 * GPU based resolution independent test object
20 * - FreeSans, '0'
21 * - TTF Shape for Glyph 19
22 */
24 public:
26 using namespace gamp::graph;
27
28 constexpr OutlineShape::size_type pos0 = 0;
29
30 // Start TTF Shape for Glyph 168
31 // 000: B0a: move-to p0
32 // Shape.MoveTo:
33 shape.closeLastOutline(false);
34 shape.addEmptyOutline();
35 shape.addVertex(pos0, 0.450000f, -0.013000f, 0, true);
36 // 000: B4: quad-to p0-p1-p2h **** MID
37 // Shape.QuadTo:
38 shape.addVertex(pos0, 0.386000f, -0.013000f, 0, false);
39 shape.addVertex(pos0, 0.353000f, 0.018000f, 0, true);
40 // 002: B6: quad-to pMh-p0-p1
41 // Shape.QuadTo:
42 shape.addVertex(pos0, 0.319000f, 0.049000f, 0, false); // NOLINT
43 shape.addVertex(pos0, 0.307000f, 0.118000f, 0, true);
44 // 003: B4: quad-to p0-p1-p2h **** MID
45 // Shape.QuadTo:
46 shape.addVertex(pos0, 0.265000f, 0.049000f, 0, false);
47 shape.addVertex(pos0, 0.225000f, 0.019000f, 0, true);
48 // 005: B6: quad-to pMh-p0-p1
49 // Shape.QuadTo:
50 shape.addVertex(pos0, 0.184000f, -0.012000f, 0, false);
51 shape.addVertex(pos0, 0.134000f, -0.012000f, 0, true);
52 // 006: B4: quad-to p0-p1-p2h **** MID
53 // Shape.QuadTo:
54 shape.addVertex(pos0, 0.085000f, -0.012000f, 0, false);
55 shape.addVertex(pos0, 0.053000f, 0.021000f, 0, true);
56 // 008: B6: quad-to pMh-p0-p1
57 // Shape.QuadTo:
58 shape.addVertex(pos0, 0.020000f, 0.055000f, 0, false);
59 shape.addVertex(pos0, 0.020000f, 0.106000f, 0, true);
60 // 009: B4: quad-to p0-p1-p2h **** MID
61 // Shape.QuadTo:
62 shape.addVertex(pos0, 0.020000f, 0.185000f, 0, false);
63 shape.addVertex(pos0, 0.062000f, 0.269000f, 0, true);
64 // 011: B5: quad-to pMh-p0-p1h ***** MID
65 // Shape.QuadTo:
66 shape.addVertex(pos0, 0.105000f, 0.353000f, 0, false);
67 shape.addVertex(pos0, 0.170000f, 0.407000f, 0, true);
68 // 012: B6: quad-to pMh-p0-p1
69 // Shape.QuadTo:
70 shape.addVertex(pos0, 0.235000f, 0.462000f, 0, false);
71 shape.addVertex(pos0, 0.296000f, 0.462000f, 0, true);
72 // 013: B4: quad-to p0-p1-p2h **** MID
73 // Shape.QuadTo:
74 shape.addVertex(pos0, 0.328000f, 0.462000f, 0, false);
75 shape.addVertex(pos0, 0.346000f, 0.448000f, 0, true);
76 // 015: B6: quad-to pMh-p0-p1
77 // Shape.QuadTo:
78 shape.addVertex(pos0, 0.364000f, 0.433000f, 0, false);
79 shape.addVertex(pos0, 0.377000f, 0.396000f, 0, true);
80 // 016: B1: line-to p0-p1
81 // Shape.LineTo:
82 shape.addVertex(pos0, 0.395000f, 0.454000f, 0, true);
83 // 017: B1: line-to p0-p1
84 // Shape.LineTo:
85 shape.addVertex(pos0, 0.498000f, 0.459000f, 0, true);
86 // 018: B1: line-to p0-p1
87 // Shape.LineTo:
88 shape.addVertex(pos0, 0.478000f, 0.394000f, 0, true);
89 // 019: B4: quad-to p0-p1-p2h **** MID
90 // Shape.QuadTo:
91 shape.addVertex(pos0, 0.510000f, 0.431000f, 0, false);
92 shape.addVertex(pos0, 0.535000f, 0.445000f, 0, true);
93 // 021: B6: quad-to pMh-p0-p1
94 // Shape.QuadTo:
95 shape.addVertex(pos0, 0.561000f, 0.459000f, 0, false);
96 shape.addVertex(pos0, 0.598000f, 0.459000f, 0, true);
97 // 022: B4: quad-to p0-p1-p2h **** MID
98 // Shape.QuadTo:
99 shape.addVertex(pos0, 0.645000f, 0.459000f, 0, false);
100 shape.addVertex(pos0, 0.671000f, 0.436000f, 0, true);
101 // 024: B6: quad-to pMh-p0-p1
102 // Shape.QuadTo:
103 shape.addVertex(pos0, 0.698000f, 0.413000f, 0, false);
104 shape.addVertex(pos0, 0.698000f, 0.372000f, 0, true);
105 // 025: B4: quad-to p0-p1-p2h **** MID
106 // Shape.QuadTo:
107 shape.addVertex(pos0, 0.698000f, 0.310000f, 0, false);
108 shape.addVertex(pos0, 0.639000f, 0.263000f, 0, true);
109 // 027: B6: quad-to pMh-p0-p1
110 // Shape.QuadTo:
111 shape.addVertex(pos0, 0.579000f, 0.215000f, 0, false);
112 shape.addVertex(pos0, 0.470000f, 0.190000f, 0, true);
113 // 028: B1: line-to p0-p1
114 // Shape.LineTo:
115 shape.addVertex(pos0, 0.431000f, 0.181000f, 0, true);
116 // 029: B2: quad-to p0-p1-p2
117 // Shape.QuadTo:
118 shape.addVertex(pos0, 0.426000f, 0.156000f, 0, false);
119 shape.addVertex(pos0, 0.426000f, 0.134000f, 0, true);
120 // 031: B4: quad-to p0-p1-p2h **** MID
121 // Shape.QuadTo:
122 shape.addVertex(pos0, 0.426000f, 0.096000f, 0, false);
123 shape.addVertex(pos0, 0.444000f, 0.073000f, 0, true);
124 // 033: B6: quad-to pMh-p0-p1
125 // Shape.QuadTo:
126 shape.addVertex(pos0, 0.462000f, 0.050000f, 0, false);
127 shape.addVertex(pos0, 0.493000f, 0.050000f, 0, true);
128 // 034: B2: quad-to p0-p1-p2
129 // Shape.QuadTo:
130 shape.addVertex(pos0, 0.565000f, 0.050000f, 0, false); // NOLINT
131 shape.addVertex(pos0, 0.616000f, 0.139000f, 0, true);
132 // 036: B1: line-to p0-p1
133 // Shape.LineTo:
134 shape.addVertex(pos0, 0.644000f, 0.122000f, 0, true);
135 // 037: B2: quad-to p0-p1-p2
136 // Shape.QuadTo:
137 shape.addVertex(pos0, 0.578000f, -0.013000f, 0, false); // NOLINT
138 shape.addVertex(pos0, 0.450000f, -0.013000f, 0, true);
139 jau::PLAIN_PRINT(true, "Glyph05FreeSerifBoldItalic_ae.shape01a.winding_area: %s", jau::math::geom::to_string(shape.windingOfLastOutline()).c_str());
140 shape.closeLastOutline(false);
141
142 // 039: B0a: move-to p0
143 // Shape.MoveTo:
144 shape.closeLastOutline(false);
145 shape.addEmptyOutline();
146 shape.addVertex(pos0, 0.194000f, 0.058000f, 0, true);
147 // 039: B4: quad-to p0-p1-p2h **** MID
148 // Shape.QuadTo:
149 shape.addVertex(pos0, 0.238000f, 0.058000f, 0, false);
150 shape.addVertex(pos0, 0.278000f, 0.122000f, 0, true);
151 // 041: B5: quad-to pMh-p0-p1h ***** MID
152 // Shape.QuadTo:
153 shape.addVertex(pos0, 0.319000f, 0.187000f, 0, false); // NOLINT
154 shape.addVertex(pos0, 0.338000f, 0.256000f, 0, true);
155 // 042: B6: quad-to pMh-p0-p1
156 // Shape.QuadTo:
157 shape.addVertex(pos0, 0.358000f, 0.326000f, 0, false);
158 shape.addVertex(pos0, 0.358000f, 0.363000f, 0, true);
159 // 043: B4: quad-to p0-p1-p2h **** MID
160 // Shape.QuadTo:
161 shape.addVertex(pos0, 0.358000f, 0.387000f, 0, false);
162 shape.addVertex(pos0, 0.345000f, 0.403000f, 0, true);
163 // 045: B6: quad-to pMh-p0-p1
164 // Shape.QuadTo:
165 shape.addVertex(pos0, 0.331000f, 0.419000f, 0, false);
166 shape.addVertex(pos0, 0.310000f, 0.419000f, 0, true);
167 // 046: B4: quad-to p0-p1-p2h **** MID
168 // Shape.QuadTo:
169 shape.addVertex(pos0, 0.267000f, 0.419000f, 0, false);
170 shape.addVertex(pos0, 0.227000f, 0.356000f, 0, true);
171 // 048: B5: quad-to pMh-p0-p1h ***** MID
172 // Shape.QuadTo:
173 shape.addVertex(pos0, 0.187000f, 0.293000f, 0, false);
174 shape.addVertex(pos0, 0.167000f, 0.225000f, 0, true);
175 // 049: B6: quad-to pMh-p0-p1
176 // Shape.QuadTo:
177 shape.addVertex(pos0, 0.146000f, 0.156000f, 0, false);
178 shape.addVertex(pos0, 0.146000f, 0.119000f, 0, true);
179 // 050: B4: quad-to p0-p1-p2h **** MID
180 // Shape.QuadTo:
181 shape.addVertex(pos0, 0.146000f, 0.092000f, 0, false);
182 shape.addVertex(pos0, 0.159000f, 0.075000f, 0, true);
183 // 052: B6: quad-to pMh-p0-p1
184 // Shape.QuadTo:
185 shape.addVertex(pos0, 0.172000f, 0.058000f, 0, false);
186 shape.addVertex(pos0, 0.194000f, 0.058000f, 0, true);
187 jau::PLAIN_PRINT(true, "Glyph05FreeSerifBoldItalic_ae.shape02a.winding_area: %s", jau::math::geom::to_string(shape.windingOfLastOutline()).c_str());
188 shape.closeLastOutline(false);
189
190 if( true ) {
191 // GlyphShape<168>: offset 0 of 8/61 points
192 // pM[060] P[443/231, on true, end true]
193 // p0[053] P[438/214, on true, end false]
194 // p1[054] P[498/223, on false, end false]
195 // p2[055] P[608/320, on false, end false]
196 // 053: B0a: move-to p0
197 // Shape.MoveTo:
198 shape.closeLastOutline(false);
199 shape.addEmptyOutline();
200 shape.addVertex(pos0, 0.438000f, 0.214000f, 0, true);
201 // 053: B4: quad-to p0-p1-p2h **** MID
202 // Shape.QuadTo:
203 shape.addVertex(pos0, 0.498000f, 0.223000f, 0, false);
204 shape.addVertex(pos0, 0.553000f, 0.271000f, 0, true);
205 // GlyphShape<168>: offset 2 of 8/61 points
206 // pM[054] P[498/223, on false, end false]
207 // p0[055] P[608/320, on false, end false]
208 // p1[056] P[608/388, on true, end false]
209 // p2[057] P[608/429, on false, end false]
210 // 055: B6: quad-to pMh-p0-p1
211 // Shape.QuadTo:
212 shape.addVertex(pos0, 0.608000f, 0.320000f, 0, false);
213 shape.addVertex(pos0, 0.608000f, 0.388000f, 0, true);
214 // GlyphShape<168>: offset 3 of 8/61 points
215 // pM[055] P[608/320, on false, end false]
216 // p0[056] P[608/388, on true, end false]
217 // p1[057] P[608/429, on false, end false]
218 // p2[058] P[575/429, on true, end false]
219 // 056: B2: quad-to p0-p1-p2
220 // Shape.QuadTo:
221 shape.addVertex(pos0, 0.608000f, 0.429000f, 0, false);
222 shape.addVertex(pos0, 0.575000f, 0.429000f, 0, true);
223 // GlyphShape<168>: offset 5 of 8/61 points
224 // pM[057] P[608/429, on false, end false]
225 // p0[058] P[575/429, on true, end false]
226 // p1[059] P[502/429, on false, end false]
227 // p2[060] P[443/231, on true, end true]
228 // 058: B2: quad-to p0-p1-p2
229 // Shape.QuadTo:
230 shape.addVertex(pos0, 0.502000f, 0.429000f, 0, false);
231 shape.addVertex(pos0, 0.443000f, 0.231000f, 0, true);
232 // GlyphShape<168>: offset 7 of 8/61 points
233 // pM[059] P[502/429, on false, end false]
234 // p0[060] P[443/231, on true, end true]
235 // p1[053] P[438/214, on true, end false]
236 // p2[054] P[498/223, on false, end false]
237 // 060: B1: line-to p0-p1
238 // Shape.LineTo:
239 shape.addVertex(pos0, 0.438000f, 0.214000f, 0, true);
240 jau::PLAIN_PRINT(true, "Glyph05FreeSerifBoldItalic_ae.shape03a.winding_area: %s", jau::math::geom::to_string(shape.windingOfLastOutline()).c_str());
241 shape.closeLastOutline(false);
242 }
243
244 // End Shape for Glyph 168
245
246 shape.setIsQuadraticNurbs();
248 }
249};
250
251#endif // GAMP_DEMOS_GRAPH_TESTSHAPES_GLYPH05FSBI_AE_HPP_
GPU based resolution independent test object.
static void addShapeToRegion(gamp::graph::OutlineShape &shape)
A Generic shape objects which is defined by a list of Outlines.
void setSharpness(float s) noexcept
Sets sharpness, defaults to DEFAULT_SHARPNESS.
Winding windingOfLastOutline() const noexcept
Compute the Winding of the getLastOutline() using the VectorUtil#area(ArrayList) function over all of...
void closeLastOutline(bool closeTail)
Closes the last outline in the shape.
void setIsQuadraticNurbs() noexcept
Claim this outline's vertices are all VertexState::quadratic_nurbs, hence no cubic transformations wi...
static constexpr float DEFAULT_SHARPNESS
Initial sharpness() value, which can be modified via setSharpness(float).
void addEmptyOutline()
Add a new empty Outline to the end of this shape's outline list.
void addVertex(const Vertex &v)
Adds a vertex to the last open outline to the shape's tail.
std::string to_string(const math_error_t v) noexcept
Returns std::string representation of math_error_t.
void PLAIN_PRINT(const bool printPrefix, const char *format,...) noexcept
Use for unconditional plain messages, prefix '[elapsed_time] ' if printPrefix == true.
Definition debug.cpp:258