| 1 | /* |
| 2 | * Copyright © 2020 Benjamin Otte |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2.1 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 16 | * |
| 17 | * Authors: Benjamin Otte <[email protected]> |
| 18 | */ |
| 19 | |
| 20 | #include <gtk/gtk.h>cxx . . $ `<file>/gtk/gtk.h`/ |
| 21 | |
| 22 | /* testcases from path_parser.rs in librsvg */ |
| 23 | static void |
| 24 | test_rsvg_parsecxx . . $ test_rsvg_parse(49f6e7a06ebc5aa8). (void) |
| 25 | { |
| 26 | structcxx . . $ test_rsvg_parse(49f6e7a06ebc5aa8).$anonymous_type_0# { |
| 27 | const char *incxx . . $ test_rsvg_parse(49f6e7a06ebc5aa8).$anonymous_type_0#in.; |
| 28 | const char *outcxx . . $ test_rsvg_parse(49f6e7a06ebc5aa8).$anonymous_type_0#out.; |
| 29 | } tests[] = { |
| 30 | { "", "" }, |
| 31 | // numbers |
| 32 | { "M 10 20", "M 10 20" }, |
| 33 | { "M -10 -20", "M -10 -20" }, |
| 34 | { "M .10 0.20", "M 0.1 0.2" }, |
| 35 | { "M -.10 -0.20", "M -0.1 -0.2" }, |
| 36 | { "M-.10-0.20", "M -0.1 -0.2" }, |
| 37 | { "M10.5.50", "M 10.5 0.5" }, |
| 38 | { "M.10.20", "M 0.1 0.2" }, |
| 39 | { "M .10E1 .20e-4", "M 1 2e-05" }, |
| 40 | { "M-.10E1-.20", "M -1 -0.2" }, |
| 41 | { "M10.10E2 -0.20e3", "M 1010 -200" }, |
| 42 | { "M-10.10E2-0.20e-3", "M -1010 -0.0002" }, |
| 43 | { "M1e2.5", "M 100 0.5" }, |
| 44 | { "M1e-2.5", "M 0.01 0.5" }, |
| 45 | { "M1e+2.5", "M 100 0.5" }, |
| 46 | // bogus numbers |
| 47 | { "M+", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 48 | { "M-", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 49 | { "M+x", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 50 | { "M10e", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 51 | { "M10ex", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 52 | { "M10e-", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 53 | { "M10e+x", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 54 | // numbers with comma |
| 55 | { "M 10, 20", "M 10 20" }, |
| 56 | { "M -10,-20", "M -10 -20" }, |
| 57 | { "M.10 , 0.20", "M 0.1 0.2" }, |
| 58 | { "M -.10, -0.20 ", "M -0.1 -0.2" }, |
| 59 | { "M-.10-0.20", "M -0.1 -0.2" }, |
| 60 | { "M.10.20", "M 0.1 0.2" }, |
| 61 | { "M .10E1,.20e-4", "M 1 2e-05" }, |
| 62 | { "M-.10E-2,-.20", "M -0.001 -0.2" }, |
| 63 | { "M10.10E2,-0.20e3", "M 1010 -200" }, |
| 64 | { "M-10.10E2,-0.20e-3", "M -1010 -0.0002" }, |
| 65 | // single moveto |
| 66 | { "M 10 20 ", "M 10 20" }, |
| 67 | { "M10,20 ", "M 10 20" }, |
| 68 | { "M10 20 ", "M 10 20" }, |
| 69 | { " M10,20 ", "M 10 20" }, |
| 70 | // relative moveto |
| 71 | { "m10 20", "M 10 20" }, |
| 72 | // absolute moveto with implicit lineto |
| 73 | { "M10 20 30 40", "M 10 20 L 30 40" }, |
| 74 | { "M10,20,30,40", "M 10 20 L 30 40" }, |
| 75 | { "M.1-2,3E2-4", "M 0.1 -2 L 300 -4" }, |
| 76 | // relative moveto with implicit lineto |
| 77 | { "m10 20 30 40", "M 10 20 L 40 60" }, |
| 78 | // relative moveto with relative lineto sequence |
| 79 | { "m 46,447 l 0,0.5 -1,0 -1,0 0,1 0,12", |
| 80 | "M 46 447 L 46 447.5 L 45 447.5 L 44 447.5 L 44 448.5 L 44 460.5" }, |
| 81 | // absolute moveto with implicit linetos |
| 82 | { "M10,20 30,40,50 60", "M 10 20 L 30 40 L 50 60" }, |
| 83 | // relative moveto with implicit linetos |
| 84 | { "m10 20 30 40 50 60", "M 10 20 L 40 60 L 90 120" }, |
| 85 | // absolute moveto moveto |
| 86 | { "M10 20 M 30 40", "M 10 20 M 30 40" }, |
| 87 | // relative moveto moveto |
| 88 | { "m10 20 m 30 40", "M 10 20 M 40 60" }, |
| 89 | // relative moveto lineto moveto |
| 90 | { "m10 20 30 40 m 50 60", "M 10 20 L 40 60 M 90 120" }, |
| 91 | // absolute moveto lineto |
| 92 | { "M10 20 L30,40", "M 10 20 L 30 40" }, |
| 93 | // relative moveto lineto |
| 94 | { "m10 20 l30,40", "M 10 20 L 40 60" }, |
| 95 | // relative moveto lineto lineto abs lineto |
| 96 | { "m10 20 30 40l30,40,50 60L200,300", |
| 97 | "M 10 20 L 40 60 L 70 100 L 120 160 L 200 300" }, |
| 98 | // horizontal lineto |
| 99 | { "M10 20 H30", "M 10 20 L 30 20" }, |
| 100 | { "M 10 20 H 30 40", "M 10 20 L 30 20 L 40 20" }, |
| 101 | { "M10 20 H30,40-50", "M 10 20 L 30 20 L 40 20 L -50 20" }, |
| 102 | { "m10 20 h30,40-50", "M 10 20 L 40 20 L 80 20 L 30 20" }, |
| 103 | // vertical lineto |
| 104 | { "M10 20 V30", "M 10 20 L 10 30" }, |
| 105 | { "M10 20 V30 40", "M 10 20 L 10 30 L 10 40" }, |
| 106 | { "M10 20 V30,40-50", "M 10 20 L 10 30 L 10 40 L 10 -50" }, |
| 107 | { "m10 20 v30,40-50", "M 10 20 L 10 50 L 10 90 L 10 40" }, |
| 108 | // curveto |
| 109 | { "M10 20 C 30,40 50 60-70,80", "M 10 20 C 30 40, 50 60, -70 80" }, |
| 110 | { "M10 20 C 30,40 50 60-70,80,90 100,110 120,130,140", |
| 111 | "M 10 20 C 30 40, 50 60, -70 80 C 90 100, 110 120, 130 140" }, |
| 112 | { "m10 20 c 30,40 50 60-70,80,90 100,110 120,130,140", |
| 113 | "M 10 20 C 40 60, 60 80, -60 100 C 30 200, 50 220, 70 240" }, |
| 114 | { "m10 20 c 30,40 50 60-70,80 90 100,110 120,130,140", |
| 115 | "M 10 20 C 40 60, 60 80, -60 100 C 30 200, 50 220, 70 240" }, |
| 116 | // smooth curveto |
| 117 | { "M10 20 S 30,40-50,60", "M 10 20 C 10 20, 30 40, -50 60" }, |
| 118 | { "M10 20 S 30,40 50 60-70,80,90 100", |
| 119 | "M 10 20 C 10 20, 30 40, 50 60 C 70 80, -70 80, 90 100" }, |
| 120 | // quadratic curveto |
| 121 | { "M10 20 Q30 40 50 60", "M 10 20 Q 30 40, 50 60" }, |
| 122 | { "M10 20 Q30 40 50 60,70,80-90 100", |
| 123 | "M 10 20 Q 30 40, 50 60 Q 70 80, -90 100" }, |
| 124 | { "m10 20 q 30,40 50 60-70,80 90 100", |
| 125 | "M 10 20 Q 40 60, 60 80 Q -10 160, 150 180" }, |
| 126 | // smooth quadratic curveto |
| 127 | { "M10 20 T30 40", "M 10 20 Q 10 20, 30 40" }, |
| 128 | { "M10 20 Q30 40 50 60 T70 80", "M 10 20 Q 30 40, 50 60 Q 70 80, 70 80" }, |
| 129 | { "m10 20 q 30,40 50 60t-70,80", |
| 130 | "M 10 20 Q 40 60, 60 80 Q 80 100, -10 160" }, |
| 131 | // elliptical arc. Exact numbers depend on too much math, so just verify |
| 132 | // that these parse successfully |
| 133 | { "M 1 3 A 1 2 3 00 6 7", "path" }, |
| 134 | { "M 1 2 A 1 2 3 016 7", "path" }, |
| 135 | { "M 1 2 A 1 2 3 10,6 7", "path" }, |
| 136 | { "M 1 2 A 1 2 3 1,1 6 7", "path" }, |
| 137 | { "M 1 2 A 1 2 3 1 1 6 7", "path" }, |
| 138 | { "M 1 2 A 1 2 3 1 16 7", "path" }, |
| 139 | // close path |
| 140 | { "M10 20 Z", "M 10 20 Z" }, |
| 141 | { "m10 20 30 40 m 50 60 70 80 90 100z", "M 10 20 L 40 60 M 90 120 L 160 200 L 250 300 Z" }, |
| 142 | // must start with moveto |
| 143 | { " L10 20", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 144 | // moveto args |
| 145 | { "M", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 146 | { "M,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 147 | { "M10", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 148 | { "M10,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 149 | { "M10x", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 150 | { "M10,x", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 151 | { "M10-20,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 152 | { "M10-20-30", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 153 | { "M10-20-30 x", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 154 | // closepath args |
| 155 | { "M10-20z10", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 156 | { "M10-20z,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 157 | // lineto args |
| 158 | { "M10-20L10", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 159 | { "M 10,10 L 20,20,30", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 160 | { "M 10,10 L 20,20,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 161 | // horizontal lineto args |
| 162 | { "M10-20H", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 163 | { "M10-20H,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 164 | { "M10-20H30,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 165 | // vertical lineto args |
| 166 | { "M10-20v", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 167 | { "M10-20v,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 168 | { "M10-20v30,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 169 | // curveto args |
| 170 | { "M10-20C1", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 171 | { "M10-20C1,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 172 | { "M10-20C1 2", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 173 | { "M10-20C1,2,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 174 | { "M10-20C1 2 3", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 175 | { "M10-20C1,2,3", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 176 | { "M10-20C1,2,3,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 177 | { "M10-20C1 2 3 4", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 178 | { "M10-20C1,2,3,4", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 179 | { "M10-20C1,2,3,4,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 180 | { "M10-20C1 2 3 4 5", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 181 | { "M10-20C1,2,3,4,5", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 182 | { "M10-20C1,2,3,4,5,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 183 | { "M10-20C1,2,3,4,5,6,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 184 | // smooth curveto args |
| 185 | { "M10-20S1", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 186 | { "M10-20S1,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 187 | { "M10-20S1 2", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 188 | { "M10-20S1,2,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 189 | { "M10-20S1 2 3", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 190 | { "M10-20S1,2,3,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 191 | { "M10-20S1,2,3,4,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 192 | // quadratic curveto args |
| 193 | { "M10-20Q1", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 194 | { "M10-20Q1,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 195 | { "M10-20Q1 2", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 196 | { "M10-20Q1,2,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 197 | { "M10-20Q1 2 3", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 198 | { "M10-20Q1,2,3", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 199 | { "M10-20Q1,2,3,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 200 | { "M10 20 Q30 40 50 60,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 201 | // smooth quadratic curveto args |
| 202 | { "M10-20T1", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 203 | { "M10-20T1,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 204 | { "M10 20 T 30 40,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 205 | // elliptical arc args |
| 206 | { "M10-20A1", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 207 | { "M10-20A1,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 208 | { "M10-20A1 2", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 209 | { "M10-20A1 2,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 210 | { "M10-20A1 2 3", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 211 | { "M10-20A1 2 3,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 212 | { "M10-20A1 2 3 4", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 213 | { "M10-20A1 2 3 1", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 214 | { "M10-20A1 2 3,1,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 215 | { "M10-20A1 2 3 1 5", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 216 | { "M10-20A1 2 3 1 1", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 217 | { "M10-20A1 2 3,1,1,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 218 | { "M10-20A1 2 3 1 1 6", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 219 | { "M10-20A1 2 3,1,1,6,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 220 | { "M 1 2 A 1 2 3 1.0 0.0 6 7", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 221 | { "M10-20A1 2 3,1,1,6,7,", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 222 | // misc |
| 223 | { "M.. 1,0 0,100000", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 224 | { "M 10 20,M 10 20", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 225 | { "M 10 20, M 10 20", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 226 | { "M 10 20, M 10 20", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 227 | { "M 10 20, ", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 228 | |
| 229 | /* The following are not part of the rsvg tests */ |
| 230 | |
| 231 | // an icon that was triggering broken handling of 'm' |
| 232 | // Note that the output here is using 'M' to ensure the expected rendering |
| 233 | { "M 4 1 c -1.660156 0 -3 1.339844 -3 3 v 8 c 0 1.660156 1.339844 3 3 3 h 8 c 1.660156 0 3 -1.339844 3 -3 v -8 c 0 -1.660156 -1.339844 -3 -3 -3 z m 0 6 h 8 v 2 h -8 z m 0 0", "m 4 1 c -1.660156 0 -3 1.339844 -3 3 v 8 c 0 1.660156 1.339844 3 3 3 h 8 c 1.660156 0 3 -1.339844 3 -3 v -8 c 0 -1.660156 -1.339844 -3 -3 -3 z M 4 7 h 8 v 2 h -8 z m 0 0" }, |
| 234 | // another icon that was triggering broken handling of custom contours |
| 235 | // Note that the output here is using 'M' to ensure the expected rendering |
| 236 | { "m 2 0 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z " |
| 237 | "m 8 0 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z " |
| 238 | "m -8 2 h 3 v 3 h -3 z " |
| 239 | "m 8 0 h 3 v 3 h -3 z " |
| 240 | "m -8 6 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z " |
| 241 | "m 8 0 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z " |
| 242 | "m -8 2 h 3 v 3 h -3 z " |
| 243 | "m 8 0 h 3 v 3 h -3 z", |
| 244 | |
| 245 | "M 2 0 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z " |
| 246 | "M 10 0 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z " |
| 247 | "M 2 2 h 3 v 3 h -3 z " |
| 248 | "M 10 2 h 3 v 3 h -3 z " |
| 249 | "M 2 8 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z " |
| 250 | "M 10 8 c -1.089844 0 -2 0.910156 -2 2 v 3 c 0 1.089844 0.910156 2 2 2 h 3 c 1.089844 0 2 -0.910156 2 -2 v -3 c 0 -1.089844 -0.910156 -2 -2 -2 z " |
| 251 | "M 2 10 h 3 v 3 h -3 z " |
| 252 | "M 10 10 h 3 v 3 h -3 z" }, |
| 253 | // omitted commands |
| 254 | { "M 10 10 20 30 z", "M 10 10 L 20 30 z" }, |
| 255 | { "M 10 10 c 1 2 3 4 5 6 4 2 1 0 2 2 z", |
| 256 | "M 10 10 c 1 2 3 4 5 6 c 4 2 1 0 2 2 z" }, |
| 257 | { "M 1 2 A 1 2 3 1 16 7 1 2 3 1 16 7", "path" }, |
| 258 | // unclosed subpath |
| 259 | { "M 10 10 20 30 20 10 10 10 M 40 40 50 50 50 40 Z m 20 0 h 4 v 4 h -4 z", |
| 260 | "M 10 10 20 30 20 10 10 10 M 40 40 50 50 50 40 Z M 60 40 h 4 v 4 h -4 z" }, |
| 261 | // whitespace at end |
| 262 | { "M 10 10 z ", "M 10 10 z" }, |
| 263 | // unexpected char |
| 264 | { "M 10 ;", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! }, |
| 265 | }; |
| 266 | int i; |
| 267 | |
| 268 | for (i = 0; i < G_N_ELEMENTScxx . . $ `<external>/12741050725406041920/gmacros.h:993:9`! (tests); i++) |
| 269 | { |
| 270 | GskPathcxx . . $ GskPath# *path; |
| 271 | char *string; |
| 272 | char *string2; |
| 273 | |
| 274 | if (g_test_verbosecxx . . $ `<external>/15287032793271088244/gtestutils.h:388:9`! ()) |
| 275 | g_printcxx . . $ g_print(326aeb464d16410c). ("%d: %s\n", i, tests[i].incxx . . $ test_rsvg_parse(49f6e7a06ebc5aa8).$anonymous_type_0#in.); |
| 276 | |
| 277 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). (tests[i].incxx . . $ test_rsvg_parse(49f6e7a06ebc5aa8).$anonymous_type_0#in.); |
| 278 | if (tests[i].outcxx . . $ test_rsvg_parse(49f6e7a06ebc5aa8).$anonymous_type_0#out.) |
| 279 | { |
| 280 | g_assert_nonnullcxx . . $ `<external>/15287032793271088244/gtestutils.h:254:9`! (path); |
| 281 | string = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 282 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 283 | |
| 284 | if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (tests[i].outcxx . . $ test_rsvg_parse(49f6e7a06ebc5aa8).$anonymous_type_0#out., "path") != 0) |
| 285 | { |
| 286 | /* Preferred, but doesn't work, because gsk_path_print() |
| 287 | * prints numbers with insane accuracy |
| 288 | */ |
| 289 | /* g_assert_cmpstr (tests[i].out, ==, string); */ |
| 290 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). (tests[i].outcxx . . $ test_rsvg_parse(49f6e7a06ebc5aa8).$anonymous_type_0#out.); |
| 291 | g_assert_nonnullcxx . . $ `<external>/15287032793271088244/gtestutils.h:254:9`! (path); |
| 292 | |
| 293 | string2 = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 294 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 295 | |
| 296 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (string, ==, string2); |
| 297 | |
| 298 | g_freecxx . . $ g_free(5d22bdacc48458e8). (string2); |
| 299 | } |
| 300 | |
| 301 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). (string); |
| 302 | g_assert_nonnullcxx . . $ `<external>/15287032793271088244/gtestutils.h:254:9`! (path); |
| 303 | |
| 304 | string2 = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 305 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 306 | |
| 307 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (string, ==, string2); |
| 308 | |
| 309 | g_freecxx . . $ g_free(5d22bdacc48458e8). (string); |
| 310 | g_freecxx . . $ g_free(5d22bdacc48458e8). (string2); |
| 311 | } |
| 312 | else |
| 313 | g_assert_nullcxx . . $ `<external>/15287032793271088244/gtestutils.h:250:9`! (path); |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | static void |
| 318 | test_empty_pathcxx . . $ test_empty_path(49f6e7a06ebc5aa8). (void) |
| 319 | { |
| 320 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 321 | GskPathcxx . . $ GskPath# *path; |
| 322 | char *s; |
| 323 | graphene_rect_tcxx . . $ graphene_rect_t# bounds; |
| 324 | GskPathPointcxx . . $ GskPathPoint# point; |
| 325 | |
| 326 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 327 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 328 | |
| 329 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_is_empty (path)); |
| 330 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_is_closed (path)); |
| 331 | |
| 332 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 333 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, ""); |
| 334 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 335 | |
| 336 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_get_bounds (path, &bounds)); |
| 337 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_rect_equal (&bounds, graphene_rect_zero ())); |
| 338 | |
| 339 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_in_fill (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), GSK_FILL_RULE_WINDING)); |
| 340 | |
| 341 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_get_closest_point (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &point, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)); |
| 342 | |
| 343 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_get_start_point (path, &point)); |
| 344 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_get_end_point (path, &point)); |
| 345 | |
| 346 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 347 | } |
| 348 | |
| 349 | static void |
| 350 | test_rect_pathcxx . . $ test_rect_path(49f6e7a06ebc5aa8). (void) |
| 351 | { |
| 352 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 353 | GskPathcxx . . $ GskPath# *path; |
| 354 | char *s; |
| 355 | graphene_rect_tcxx . . $ graphene_rect_t# bounds; |
| 356 | GskPathPointcxx . . $ GskPathPoint# point; |
| 357 | float distance; |
| 358 | graphene_point_tcxx . . $ graphene_point_t# p; |
| 359 | |
| 360 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 361 | gsk_path_builder_add_rectcxx . . $ gsk_path_builder_add_rect(c725039549b6e876). (builder, &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (0, 0, 200, 100)); |
| 362 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 363 | |
| 364 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_is_empty (path)); |
| 365 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_is_closed (path)); |
| 366 | |
| 367 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 368 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 0 0 h 200 v 100 h -200 z"); |
| 369 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 370 | |
| 371 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_get_bounds (path, &bounds)); |
| 372 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_rect_equal (&bounds, &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (0, 0, 200, 100))); |
| 373 | |
| 374 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_in_fill (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (50, 50), GSK_FILL_RULE_WINDING)); |
| 375 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_in_fill (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (200, 200), GSK_FILL_RULE_WINDING)); |
| 376 | |
| 377 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_get_closest_point (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (200, 200), INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &point, &distance)); |
| 378 | |
| 379 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (distance == 100); |
| 380 | |
| 381 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_get_closest_point (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (50, -10), INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &point, &distance)); |
| 382 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &p); |
| 383 | |
| 384 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (distance == 10); |
| 385 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (&p, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (50, 0), 0.1)); |
| 386 | |
| 387 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 388 | } |
| 389 | |
| 390 | /* test quad <> cubic conversions */ |
| 391 | static gbooleancxx . . $ gboolean# |
| 392 | collect_pathcxx . . $ collect_path(b4e0555824d4f3c0). (GskPathOperationcxx . . $ GskPathOperation# op, |
| 393 | const graphene_point_tcxx . . $ graphene_point_t# *pts, |
| 394 | gsizecxx . . $ gsize# n_pts, |
| 395 | float weight, |
| 396 | gpointercxx . . $ gpointer# user_data) |
| 397 | { |
| 398 | GskPathBuildercxx . . $ GskPathBuilder# *builder = user_data; |
| 399 | |
| 400 | if (op == GSK_PATH_MOVEcxx . . $ GSK_PATH_MOVE.) |
| 401 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 402 | |
| 403 | switch (op) |
| 404 | { |
| 405 | case GSK_PATH_MOVEcxx . . $ GSK_PATH_MOVE.: |
| 406 | break; |
| 407 | |
| 408 | case GSK_PATH_CLOSEcxx . . $ GSK_PATH_CLOSE.: |
| 409 | gsk_path_builder_closecxx . . $ gsk_path_builder_close(461b7a88b5bb50f9). (builder); |
| 410 | break; |
| 411 | |
| 412 | case GSK_PATH_LINEcxx . . $ GSK_PATH_LINE.: |
| 413 | gsk_path_builder_line_tocxx . . $ gsk_path_builder_line_to(49a94c94a194fe45). (builder, pts[1].xcxx . . $ _graphene_point_t#x., pts[1].ycxx . . $ _graphene_point_t#y.); |
| 414 | break; |
| 415 | |
| 416 | case GSK_PATH_QUADcxx . . $ GSK_PATH_QUAD.: |
| 417 | gsk_path_builder_quad_tocxx . . $ gsk_path_builder_quad_to(b4ab4be88ab42ec9). (builder, pts[1].xcxx . . $ _graphene_point_t#x., pts[1].ycxx . . $ _graphene_point_t#y., |
| 418 | pts[2].xcxx . . $ _graphene_point_t#x., pts[2].ycxx . . $ _graphene_point_t#y.); |
| 419 | break; |
| 420 | |
| 421 | case GSK_PATH_CUBICcxx . . $ GSK_PATH_CUBIC.: |
| 422 | gsk_path_builder_cubic_tocxx . . $ gsk_path_builder_cubic_to(7c4e18740ce3f209). (builder, pts[1].xcxx . . $ _graphene_point_t#x., pts[1].ycxx . . $ _graphene_point_t#y., |
| 423 | pts[2].xcxx . . $ _graphene_point_t#x., pts[2].ycxx . . $ _graphene_point_t#y., |
| 424 | pts[3].xcxx . . $ _graphene_point_t#x., pts[3].ycxx . . $ _graphene_point_t#y.); |
| 425 | break; |
| 426 | |
| 427 | case GSK_PATH_CONICcxx . . $ GSK_PATH_CONIC.: |
| 428 | gsk_path_builder_conic_tocxx . . $ gsk_path_builder_conic_to(5a49017b9964fddc). (builder, pts[1].xcxx . . $ _graphene_point_t#x., pts[1].ycxx . . $ _graphene_point_t#y., |
| 429 | pts[2].xcxx . . $ _graphene_point_t#x., pts[2].ycxx . . $ _graphene_point_t#y., |
| 430 | weight); |
| 431 | break; |
| 432 | |
| 433 | default: |
| 434 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); |
| 435 | } |
| 436 | |
| 437 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 438 | } |
| 439 | |
| 440 | static void |
| 441 | test_foreachcxx . . $ test_foreach(49f6e7a06ebc5aa8). (void) |
| 442 | { |
| 443 | const char *s = "M 0 0 Q 9 0, 9 9 Q 99 9, 99 18 Z"; |
| 444 | const char *sp = "M 0 0 C 6 0, 9 3, 9 9 C 69 9, 99 12, 99 18 Z"; |
| 445 | GskPathcxx . . $ GskPath# *path, *path2; |
| 446 | char *s2; |
| 447 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 448 | |
| 449 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). (s); |
| 450 | |
| 451 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 452 | gsk_path_foreachcxx . . $ gsk_path_foreach(9f5a8749e3da8ac5). (path, GSK_PATH_FOREACH_ALLOW_QUADcxx . . $ GSK_PATH_FOREACH_ALLOW_QUAD., collect_pathcxx . . $ collect_path(b4e0555824d4f3c0)., builder); |
| 453 | path2 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 454 | s2 = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path2); |
| 455 | |
| 456 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, s2); |
| 457 | |
| 458 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path2); |
| 459 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s2); |
| 460 | |
| 461 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 462 | gsk_path_foreachcxx . . $ gsk_path_foreach(9f5a8749e3da8ac5). (path, GSK_PATH_FOREACH_ALLOW_QUADcxx . . $ GSK_PATH_FOREACH_ALLOW_QUAD.|GSK_PATH_FOREACH_ALLOW_CUBICcxx . . $ GSK_PATH_FOREACH_ALLOW_CUBIC., collect_pathcxx . . $ collect_path(b4e0555824d4f3c0)., builder); |
| 463 | path2 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 464 | s2 = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path2); |
| 465 | |
| 466 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, s2); |
| 467 | |
| 468 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path2); |
| 469 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s2); |
| 470 | |
| 471 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 472 | gsk_path_foreachcxx . . $ gsk_path_foreach(9f5a8749e3da8ac5). (path, GSK_PATH_FOREACH_ALLOW_CUBICcxx . . $ GSK_PATH_FOREACH_ALLOW_CUBIC., collect_pathcxx . . $ collect_path(b4e0555824d4f3c0)., builder); |
| 473 | path2 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 474 | s2 = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path2); |
| 475 | |
| 476 | /* We still end up with quads here, since GskPathBuilder aggressively reduces |
| 477 | * curves degrees. |
| 478 | */ |
| 479 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, s2); |
| 480 | |
| 481 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path2); |
| 482 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s2); |
| 483 | |
| 484 | path2 = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). (sp); |
| 485 | s2 = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path2); |
| 486 | |
| 487 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, s2); |
| 488 | |
| 489 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path2); |
| 490 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s2); |
| 491 | |
| 492 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 493 | } |
| 494 | |
| 495 | static void |
| 496 | test_path_pointcxx . . $ test_path_point(49f6e7a06ebc5aa8). (void) |
| 497 | { |
| 498 | GskPathcxx . . $ GskPath# *path; |
| 499 | GskPathPointcxx . . $ GskPathPoint# point; |
| 500 | gbooleancxx . . $ gboolean# ret; |
| 501 | graphene_point_tcxx . . $ graphene_point_t# pos, center; |
| 502 | graphene_vec2_tcxx . . $ graphene_vec2_t# t1, t2, mx; |
| 503 | float curvature; |
| 504 | |
| 505 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). ("M 0 0 L 100 0 L 100 100 L 0 100 Z"); |
| 506 | |
| 507 | ret = gsk_path_get_start_pointcxx . . $ gsk_path_get_start_point(3459fba3d60e75a). (path, &point); |
| 508 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (ret); |
| 509 | |
| 510 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.contour == 0); |
| 511 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.idx == 1); |
| 512 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.t == 0); |
| 513 | |
| 514 | ret = gsk_path_get_end_pointcxx . . $ gsk_path_get_end_point(3459fba3d60e75a). (path, &point); |
| 515 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (ret); |
| 516 | |
| 517 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.contour == 0); |
| 518 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.idx == 4); |
| 519 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.t == 1); |
| 520 | |
| 521 | ret = gsk_path_get_closest_pointcxx . . $ gsk_path_get_closest_point(f299e82e10fa9cb0). (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (200, 200), INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &point, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 522 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (ret); |
| 523 | |
| 524 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.contour == 0); |
| 525 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.idx == 2); |
| 526 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.t == 1); |
| 527 | |
| 528 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 529 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_STARTcxx . . $ GSK_PATH_FROM_START., &t1); |
| 530 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_ENDcxx . . $ GSK_PATH_TO_END., &t2); |
| 531 | curvature = gsk_path_point_get_curvaturecxx . . $ gsk_path_point_get_curvature(bc6f92c49c99c393). (&point, path, GSK_PATH_FROM_STARTcxx . . $ GSK_PATH_FROM_START., ¢er); |
| 532 | |
| 533 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (100, 100))); |
| 534 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&t1, graphene_vec2_y_axis ())); |
| 535 | graphene_vec2_negatecxx . . $ graphene_vec2_negate(71fa419bbcf30806). (graphene_vec2_x_axiscxx . . $ graphene_vec2_x_axis(e49d53e75bcb40e1). (), &mx); |
| 536 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&t2, &mx)); |
| 537 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (curvature == 0); |
| 538 | |
| 539 | ret = gsk_path_get_closest_pointcxx . . $ gsk_path_get_closest_point(f299e82e10fa9cb0). (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (100, 50), INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &point, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 540 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (ret); |
| 541 | |
| 542 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.contour == 0); |
| 543 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.idx == 2); |
| 544 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.t == 0.5); |
| 545 | |
| 546 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 547 | } |
| 548 | |
| 549 | /* Test that gsk_path_builder_add_segment yields the expected results */ |
| 550 | static void |
| 551 | test_path_segmentscxx . . $ test_path_segments(49f6e7a06ebc5aa8). (void) |
| 552 | { |
| 553 | structcxx . . $ test_path_segments(49f6e7a06ebc5aa8).$anonymous_type_1# { |
| 554 | const char *pathcxx . . $ test_path_segments(49f6e7a06ebc5aa8).$anonymous_type_1#path.; |
| 555 | graphene_point_tcxx . . $ graphene_point_t# p1cxx . . $ test_path_segments(49f6e7a06ebc5aa8).$anonymous_type_1#p1.; |
| 556 | graphene_point_tcxx . . $ graphene_point_t# p2cxx . . $ test_path_segments(49f6e7a06ebc5aa8).$anonymous_type_1#p2.; |
| 557 | const char *resultcxx . . $ test_path_segments(49f6e7a06ebc5aa8).$anonymous_type_1#result.; |
| 558 | } tests[] = { |
| 559 | { |
| 560 | "M 0 0 L 100 0 L 50 50 Z", |
| 561 | { 100, 0 }, |
| 562 | { 50, 50 }, |
| 563 | "M 100 0 L 50 50" |
| 564 | }, |
| 565 | { |
| 566 | "M 0 0 L 100 0 L 50 50 Z", |
| 567 | { 50, 0 }, |
| 568 | { 70, 0 }, |
| 569 | "M 50 0 L 70 0" |
| 570 | }, |
| 571 | { |
| 572 | "M 0 0 L 100 0 L 50 50 Z", |
| 573 | { 70, 0 }, |
| 574 | { 50, 0 }, |
| 575 | "M 70 0 L 100 0 L 50 50 L 0 0 L 50 0" |
| 576 | }, |
| 577 | { |
| 578 | "M 0 0 L 100 0 L 50 50 Z", |
| 579 | { 50, 0 }, |
| 580 | { 50, 50 }, |
| 581 | "M 50 0 L 100 0 L 50 50" |
| 582 | }, |
| 583 | { |
| 584 | "M 0 0 L 100 0 L 50 50 Z", |
| 585 | { 100, 0 }, |
| 586 | { 100, 0 }, |
| 587 | "M 100 0 L 50 50 L 0 0 L 100 0" |
| 588 | } |
| 589 | }; |
| 590 | |
| 591 | for (unsigned int i = 0; i < G_N_ELEMENTScxx . . $ `<external>/12741050725406041920/gmacros.h:993:9`! (tests); i++) |
| 592 | { |
| 593 | GskPathcxx . . $ GskPath# *path; |
| 594 | GskPathPointcxx . . $ GskPathPoint# p1, p2; |
| 595 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 596 | GskPathcxx . . $ GskPath# *result; |
| 597 | char *str; |
| 598 | |
| 599 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). (tests[i].pathcxx . . $ test_path_segments(49f6e7a06ebc5aa8).$anonymous_type_1#path.); |
| 600 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_get_closest_point (path, &tests[i].p1, INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &p1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)); |
| 601 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_get_closest_point (path, &tests[i].p2, INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &p2, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)); |
| 602 | |
| 603 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 604 | gsk_path_builder_add_segmentcxx . . $ gsk_path_builder_add_segment(9c2eab29f2d9e46). (builder, path, &p1, &p2); |
| 605 | result = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 606 | str = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (result); |
| 607 | |
| 608 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (str, ==, tests[i].result); |
| 609 | |
| 610 | g_freecxx . . $ g_free(5d22bdacc48458e8). (str); |
| 611 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 612 | } |
| 613 | } |
| 614 | |
| 615 | static void |
| 616 | test_bad_in_fillcxx . . $ test_bad_in_fill(49f6e7a06ebc5aa8). (void) |
| 617 | { |
| 618 | GskPathcxx . . $ GskPath# *path; |
| 619 | gbooleancxx . . $ gboolean# inside; |
| 620 | |
| 621 | /* A fat Cantarell W */ |
| 622 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). ("M -2 694 M 206.1748046875 704 L 390.9371337890625 704 L 551.1888427734375 99.5035400390625 L 473.0489501953125 99.5035400390625 L 649.1048583984375 704 L 828.965087890625 704 L 1028.3077392578125 10 L 857.8111572265625 10 L 710.0489501953125 621.251708984375 L 775.9720458984375 598.426513671875 L 614.5245361328125 14.0489501953125 L 430.2237548828125 14.0489501953125 L 278.6783447265625 602.230712890625 L 330.0909423828125 602.230712890625 L 195.88818359375 10 L 5.7342529296875 10 L 206.1748046875 704 Z"); |
| 623 | |
| 624 | /* The midpoint of the right foot of a fat Cantarell X */ |
| 625 | inside = gsk_path_in_fillcxx . . $ gsk_path_in_fill(466fb96b6b1f1217). (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (552.360107, 704.000000), GSK_FILL_RULE_WINDINGcxx . . $ GSK_FILL_RULE_WINDING.); |
| 626 | |
| 627 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (inside); |
| 628 | |
| 629 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 630 | } |
| 631 | |
| 632 | /* Test that path_in_fill implicitly closes contours. I think this is wrong, |
| 633 | * but it is what "everybody" does. |
| 634 | */ |
| 635 | static void |
| 636 | test_unclosed_in_fillcxx . . $ test_unclosed_in_fill(49f6e7a06ebc5aa8). (void) |
| 637 | { |
| 638 | GskPathcxx . . $ GskPath# *path; |
| 639 | |
| 640 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). ("M 0 0 L 0 100 L 100 100 L 100 0 Z"); |
| 641 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_in_fill (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (50, 50), GSK_FILL_RULE_WINDING)); |
| 642 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 643 | |
| 644 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). ("M 0 0 L 0 100 L 100 100 L 100 0"); |
| 645 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_in_fill (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (50, 50), GSK_FILL_RULE_WINDING)); |
| 646 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 647 | } |
| 648 | |
| 649 | /* Test that all the gsk_path_builder_add methods close the current |
| 650 | * contour in the end and do not change the current point. |
| 651 | */ |
| 652 | static void |
| 653 | test_path_builder_addcxx . . $ test_path_builder_add(49f6e7a06ebc5aa8). (void) |
| 654 | { |
| 655 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 656 | GskPathcxx . . $ GskPath# *path, *path2; |
| 657 | char *s; |
| 658 | cairo_path_tcxx . . $ cairo_path_t# *cpath; |
| 659 | cairo_surface_tcxx . . $ cairo_surface_t# *surface; |
| 660 | cairo_tcxx . . $ cairo_t# *cr; |
| 661 | PangoLayoutcxx . . $ PangoLayout# *layout; |
| 662 | GskPathPointcxx . . $ GskPathPoint# point1, point2; |
| 663 | |
| 664 | #define N_ADD_METHODScxx . . $ `testsuite/gsk/path-special-cases.c:664:9`! 8 |
| 665 | |
| 666 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). ("M 10 10 L 100 100"); |
| 667 | |
| 668 | gsk_path_get_closest_pointcxx . . $ gsk_path_get_closest_point(f299e82e10fa9cb0). (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (50, 50), INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &point1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 669 | gsk_path_get_end_pointcxx . . $ gsk_path_get_end_point(3459fba3d60e75a). (path, &point2); |
| 670 | |
| 671 | surface = cairo_image_surface_createcxx . . $ cairo_image_surface_create(f5323823c5d32b71). (CAIRO_FORMAT_ARGB32cxx . . $ CAIRO_FORMAT_ARGB32., 100, 100); |
| 672 | cr = cairo_createcxx . . $ cairo_create(b6f0039b687ec546). (surface); |
| 673 | cairo_move_tocxx . . $ cairo_move_to(e818af540ecaa23a). (cr, 10, 10); |
| 674 | cairo_line_tocxx . . $ cairo_line_to(e818af540ecaa23a). (cr, 20, 30); |
| 675 | cpath = cairo_copy_pathcxx . . $ cairo_copy_path(3f2a520b11b50381). (cr); |
| 676 | |
| 677 | layout = pango_cairo_create_layoutcxx . . $ pango_cairo_create_layout(1508ed6461b7f869). (cr); |
| 678 | pango_layout_set_textcxx . . $ pango_layout_set_text(ae336bc313b2a60b). (layout, "ABC", -1); |
| 679 | |
| 680 | for (unsigned int i = 0; i < N_ADD_METHODScxx . . $ `testsuite/gsk/path-special-cases.c:664:9`!; i++) |
| 681 | { |
| 682 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 683 | gsk_path_builder_move_tocxx . . $ gsk_path_builder_move_to(49a94c94a194fe45). (builder, 123, 456); |
| 684 | |
| 685 | switch (i) |
| 686 | { |
| 687 | case 0: |
| 688 | gsk_path_builder_add_pathcxx . . $ gsk_path_builder_add_path(ce30aa92f7d5e43b). (builder, path); |
| 689 | break; |
| 690 | |
| 691 | case 1: |
| 692 | gsk_path_builder_add_reverse_pathcxx . . $ gsk_path_builder_add_reverse_path(ce30aa92f7d5e43b). (builder, path); |
| 693 | break; |
| 694 | |
| 695 | case 2: |
| 696 | gsk_path_builder_add_segmentcxx . . $ gsk_path_builder_add_segment(9c2eab29f2d9e46). (builder, path, &point1, &point2); |
| 697 | break; |
| 698 | |
| 699 | case 3: |
| 700 | gsk_path_builder_add_cairo_pathcxx . . $ gsk_path_builder_add_cairo_path(31ee1244eac041ce). (builder, cpath); |
| 701 | break; |
| 702 | |
| 703 | case 4: |
| 704 | gsk_path_builder_add_layoutcxx . . $ gsk_path_builder_add_layout(c2c0453556a50134). (builder, layout); |
| 705 | break; |
| 706 | |
| 707 | case 5: |
| 708 | gsk_path_builder_add_rectcxx . . $ gsk_path_builder_add_rect(c725039549b6e876). (builder, &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (0, 0, 10, 10)); |
| 709 | break; |
| 710 | |
| 711 | case 6: |
| 712 | { |
| 713 | GskRoundedRectcxx . . $ GskRoundedRect# rect; |
| 714 | |
| 715 | gsk_rounded_rect_initcxx . . $ gsk_rounded_rect_init(b2a8849c780dbc52). (&rect, |
| 716 | &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (0, 0, 100, 100), |
| 717 | &GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (10, 20), |
| 718 | &GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (20, 30), |
| 719 | &GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (0, 0), |
| 720 | &GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (10, 10)); |
| 721 | gsk_path_builder_add_rounded_rectcxx . . $ gsk_path_builder_add_rounded_rect(db15c65509282908). (builder, &rect); |
| 722 | } |
| 723 | break; |
| 724 | |
| 725 | case 7: |
| 726 | gsk_path_builder_add_circlecxx . . $ gsk_path_builder_add_circle(cdf21b5c8721fb31). (builder, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), 10); |
| 727 | break; |
| 728 | |
| 729 | default: |
| 730 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); |
| 731 | } |
| 732 | |
| 733 | gsk_path_builder_rel_line_tocxx . . $ gsk_path_builder_rel_line_to(49a94c94a194fe45). (builder, 10, 0); |
| 734 | path2 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 735 | |
| 736 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path2); |
| 737 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (g_str_has_prefixcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:159:9`! (s, "M 123 456")); |
| 738 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (g_str_has_suffixcxx . . $ `<external>/7822753393113922331/gstrfuncs.h:183:9`! (s, "M 123 456 L 133 456")); |
| 739 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 740 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path2); |
| 741 | } |
| 742 | |
| 743 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (layout); |
| 744 | |
| 745 | cairo_path_destroycxx . . $ cairo_path_destroy(b14d2e858b2ad9bf). (cpath); |
| 746 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 747 | cairo_surface_destroycxx . . $ cairo_surface_destroy(2fa2b40fabeeffa2). (surface); |
| 748 | |
| 749 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 750 | } |
| 751 | |
| 752 | static gbooleancxx . . $ gboolean# |
| 753 | rotate_path_cbcxx . . $ rotate_path_cb(b4e0555824d4f3c0). (GskPathOperationcxx . . $ GskPathOperation# op, |
| 754 | const graphene_point_tcxx . . $ graphene_point_t# *pts, |
| 755 | gsizecxx . . $ gsize# n_pts, |
| 756 | float weight, |
| 757 | gpointercxx . . $ gpointer# user_data) |
| 758 | { |
| 759 | GskPathBuildercxx . . $ GskPathBuilder# **builders = user_data; |
| 760 | |
| 761 | switch (op) |
| 762 | { |
| 763 | case GSK_PATH_MOVEcxx . . $ GSK_PATH_MOVE.: |
| 764 | gsk_path_builder_move_tocxx . . $ gsk_path_builder_move_to(49a94c94a194fe45). (builders[0], pts[0].xcxx . . $ _graphene_point_t#x., pts[0].ycxx . . $ _graphene_point_t#y.); |
| 765 | gsk_path_builder_move_tocxx . . $ gsk_path_builder_move_to(49a94c94a194fe45). (builders[1], pts[0].ycxx . . $ _graphene_point_t#y., -pts[0].xcxx . . $ _graphene_point_t#x.); |
| 766 | break; |
| 767 | |
| 768 | case GSK_PATH_CLOSEcxx . . $ GSK_PATH_CLOSE.: |
| 769 | gsk_path_builder_closecxx . . $ gsk_path_builder_close(461b7a88b5bb50f9). (builders[0]); |
| 770 | gsk_path_builder_closecxx . . $ gsk_path_builder_close(461b7a88b5bb50f9). (builders[1]); |
| 771 | break; |
| 772 | |
| 773 | case GSK_PATH_LINEcxx . . $ GSK_PATH_LINE.: |
| 774 | gsk_path_builder_line_tocxx . . $ gsk_path_builder_line_to(49a94c94a194fe45). (builders[0], pts[1].xcxx . . $ _graphene_point_t#x., pts[1].ycxx . . $ _graphene_point_t#y.); |
| 775 | gsk_path_builder_line_tocxx . . $ gsk_path_builder_line_to(49a94c94a194fe45). (builders[1], pts[1].ycxx . . $ _graphene_point_t#y., -pts[1].xcxx . . $ _graphene_point_t#x.); |
| 776 | break; |
| 777 | |
| 778 | case GSK_PATH_QUADcxx . . $ GSK_PATH_QUAD.: |
| 779 | gsk_path_builder_quad_tocxx . . $ gsk_path_builder_quad_to(b4ab4be88ab42ec9). (builders[0], pts[1].xcxx . . $ _graphene_point_t#x., pts[1].ycxx . . $ _graphene_point_t#y., pts[2].xcxx . . $ _graphene_point_t#x., pts[2].ycxx . . $ _graphene_point_t#y.); |
| 780 | gsk_path_builder_quad_tocxx . . $ gsk_path_builder_quad_to(b4ab4be88ab42ec9). (builders[1], pts[1].ycxx . . $ _graphene_point_t#y., -pts[1].xcxx . . $ _graphene_point_t#x., pts[2].ycxx . . $ _graphene_point_t#y., -pts[2].xcxx . . $ _graphene_point_t#x.); |
| 781 | break; |
| 782 | |
| 783 | case GSK_PATH_CUBICcxx . . $ GSK_PATH_CUBIC.: |
| 784 | gsk_path_builder_cubic_tocxx . . $ gsk_path_builder_cubic_to(7c4e18740ce3f209). (builders[0], pts[1].xcxx . . $ _graphene_point_t#x., pts[1].ycxx . . $ _graphene_point_t#y., pts[2].xcxx . . $ _graphene_point_t#x., pts[2].ycxx . . $ _graphene_point_t#y., pts[3].xcxx . . $ _graphene_point_t#x., pts[3].ycxx . . $ _graphene_point_t#y.); |
| 785 | gsk_path_builder_cubic_tocxx . . $ gsk_path_builder_cubic_to(7c4e18740ce3f209). (builders[1], pts[1].ycxx . . $ _graphene_point_t#y., -pts[1].xcxx . . $ _graphene_point_t#x., pts[2].ycxx . . $ _graphene_point_t#y., -pts[2].xcxx . . $ _graphene_point_t#x., pts[3].ycxx . . $ _graphene_point_t#y., -pts[3].xcxx . . $ _graphene_point_t#x.); |
| 786 | break; |
| 787 | |
| 788 | case GSK_PATH_CONICcxx . . $ GSK_PATH_CONIC.: |
| 789 | gsk_path_builder_conic_tocxx . . $ gsk_path_builder_conic_to(5a49017b9964fddc). (builders[0], pts[1].xcxx . . $ _graphene_point_t#x., pts[1].ycxx . . $ _graphene_point_t#y., pts[2].xcxx . . $ _graphene_point_t#x., pts[2].ycxx . . $ _graphene_point_t#y., weight); |
| 790 | gsk_path_builder_conic_tocxx . . $ gsk_path_builder_conic_to(5a49017b9964fddc). (builders[1], pts[1].ycxx . . $ _graphene_point_t#y., -pts[1].xcxx . . $ _graphene_point_t#x., pts[2].ycxx . . $ _graphene_point_t#y., -pts[2].xcxx . . $ _graphene_point_t#x., weight); |
| 791 | break; |
| 792 | |
| 793 | default: |
| 794 | g_assert_not_reachedcxx . . $ `<external>/15287032793271088244/gtestutils.h:274:9`! (); |
| 795 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 796 | } |
| 797 | |
| 798 | return TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 799 | } |
| 800 | |
| 801 | static void |
| 802 | test_rotated_arccxx . . $ test_rotated_arc(49f6e7a06ebc5aa8). (void) |
| 803 | { |
| 804 | GskPathcxx . . $ GskPath# *path; |
| 805 | GskPathBuildercxx . . $ GskPathBuilder# *builders[2]; |
| 806 | GskPathcxx . . $ GskPath# *paths[2]; |
| 807 | float x, y; |
| 808 | GskFillRulecxx . . $ GskFillRule# fill_rule; |
| 809 | |
| 810 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). ("M -963 186 O -375 -757, 537 -607 0.707"); |
| 811 | |
| 812 | x = -626; |
| 813 | y = -274; |
| 814 | |
| 815 | builders[0] = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 816 | builders[1] = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 817 | |
| 818 | /* Use -1 here because we want all the flags, even future additions */ |
| 819 | gsk_path_foreachcxx . . $ gsk_path_foreach(9f5a8749e3da8ac5). (path, -1, rotate_path_cbcxx . . $ rotate_path_cb(b4e0555824d4f3c0)., builders); |
| 820 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 821 | |
| 822 | paths[0] = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builders[0]); |
| 823 | paths[1] = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builders[1]); |
| 824 | |
| 825 | fill_rule = GSK_FILL_RULE_EVEN_ODDcxx . . $ GSK_FILL_RULE_EVEN_ODD.; |
| 826 | |
| 827 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_in_fill (paths[0], &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (x, y), fill_rule) |
| 828 | == |
| 829 | gsk_path_in_fill (paths[1], &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (y, -x), fill_rule)); |
| 830 | |
| 831 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (paths[0]); |
| 832 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (paths[1]); |
| 833 | } |
| 834 | |
| 835 | static void |
| 836 | test_rounded_rect_basiccxx . . $ test_rounded_rect_basic(49f6e7a06ebc5aa8). (void) |
| 837 | { |
| 838 | GskRoundedRectcxx . . $ GskRoundedRect# rect; |
| 839 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 840 | GskPathcxx . . $ GskPath# *path; |
| 841 | GskPathPointcxx . . $ GskPathPoint# point; |
| 842 | graphene_point_tcxx . . $ graphene_point_t# p; |
| 843 | |
| 844 | gsk_rounded_rect_initcxx . . $ gsk_rounded_rect_init(b2a8849c780dbc52). (&rect, &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (10, 10, 100, 50), |
| 845 | &GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (0, 0), |
| 846 | &GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (10, 10), |
| 847 | &GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (10, 30), |
| 848 | &GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (30, 0)); |
| 849 | |
| 850 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 851 | |
| 852 | gsk_path_builder_add_rounded_rectcxx . . $ gsk_path_builder_add_rounded_rect(db15c65509282908). (builder, &rect); |
| 853 | |
| 854 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 855 | |
| 856 | for (int i = 0; i < 100; i++) |
| 857 | { |
| 858 | p = GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (g_test_rand_double_range (0, 200), |
| 859 | g_test_rand_double_range (0, 200)); |
| 860 | |
| 861 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_rounded_rect_contains_point (&rect, &p) == gsk_path_in_fill (path, &p, GSK_FILL_RULE_WINDING)); |
| 862 | } |
| 863 | |
| 864 | gsk_path_get_start_pointcxx . . $ gsk_path_get_start_point(3459fba3d60e75a). (path, &point); |
| 865 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &p); |
| 866 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&p, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10))); |
| 867 | |
| 868 | gsk_path_get_end_pointcxx . . $ gsk_path_get_end_point(3459fba3d60e75a). (path, &point); |
| 869 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &p); |
| 870 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&p, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10))); |
| 871 | |
| 872 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 873 | } |
| 874 | |
| 875 | static void |
| 876 | test_rect_in_fillcxx . . $ test_rect_in_fill(49f6e7a06ebc5aa8). (void) |
| 877 | { |
| 878 | graphene_rect_tcxx . . $ graphene_rect_t# rect; |
| 879 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 880 | GskPathcxx . . $ GskPath# *path; |
| 881 | GskPathPointcxx . . $ GskPathPoint# point; |
| 882 | graphene_point_tcxx . . $ graphene_point_t# p; |
| 883 | |
| 884 | rect = GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (10, 10, 100, 50); |
| 885 | |
| 886 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 887 | |
| 888 | gsk_path_builder_add_rectcxx . . $ gsk_path_builder_add_rect(c725039549b6e876). (builder, &rect); |
| 889 | |
| 890 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 891 | |
| 892 | for (int i = 0; i < 100; i++) |
| 893 | { |
| 894 | p = GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (g_test_rand_double_range (0, 200), |
| 895 | g_test_rand_double_range (0, 200)); |
| 896 | |
| 897 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_rect_contains_point (&rect, &p) == gsk_path_in_fill (path, &p, GSK_FILL_RULE_WINDING)); |
| 898 | } |
| 899 | |
| 900 | gsk_path_get_start_pointcxx . . $ gsk_path_get_start_point(3459fba3d60e75a). (path, &point); |
| 901 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &p); |
| 902 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&p, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10))); |
| 903 | |
| 904 | gsk_path_get_end_pointcxx . . $ gsk_path_get_end_point(3459fba3d60e75a). (path, &point); |
| 905 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &p); |
| 906 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&p, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10))); |
| 907 | |
| 908 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 909 | } |
| 910 | |
| 911 | static void |
| 912 | test_circle_basiccxx . . $ test_circle_basic(49f6e7a06ebc5aa8). (void) |
| 913 | { |
| 914 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 915 | GskPathcxx . . $ GskPath# *path, *path1, *path2, *path3, *path4, *path5, *path6; |
| 916 | GskPathMeasurecxx . . $ GskPathMeasure# *measure, *measure1, *measure2, *measure3; |
| 917 | float length, length1, length2, length3; |
| 918 | GskPathPointcxx . . $ GskPathPoint# point0, point1; |
| 919 | graphene_point_tcxx . . $ graphene_point_t# p; |
| 920 | |
| 921 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 922 | gsk_path_builder_add_circlecxx . . $ gsk_path_builder_add_circle(cdf21b5c8721fb31). (builder, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), 1); |
| 923 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 924 | |
| 925 | measure = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path); |
| 926 | length = gsk_path_measure_get_lengthcxx . . $ gsk_path_measure_get_length(542aedd04bfccbf1). (measure); |
| 927 | |
| 928 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (length, 2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`!, 0.001); |
| 929 | |
| 930 | gsk_path_get_start_pointcxx . . $ gsk_path_get_start_point(3459fba3d60e75a). (path, &point0); |
| 931 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point0, path, &p); |
| 932 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&p, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (1, 0))); |
| 933 | |
| 934 | gsk_path_get_end_pointcxx . . $ gsk_path_get_end_point(3459fba3d60e75a). (path, &point0); |
| 935 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point0, path, &p); |
| 936 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&p, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (1, 0))); |
| 937 | |
| 938 | gsk_path_get_closest_pointcxx . . $ gsk_path_get_closest_point(f299e82e10fa9cb0). (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (1, 1), INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &point0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 939 | gsk_path_get_closest_pointcxx . . $ gsk_path_get_closest_point(f299e82e10fa9cb0). (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (-1, 1), INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &point1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 940 | |
| 941 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 942 | gsk_path_builder_add_segmentcxx . . $ gsk_path_builder_add_segment(9c2eab29f2d9e46). (builder, path, &point0, &point1); |
| 943 | path1 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 944 | |
| 945 | measure1 = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path1); |
| 946 | length1 = gsk_path_measure_get_lengthcxx . . $ gsk_path_measure_get_length(542aedd04bfccbf1). (measure1); |
| 947 | |
| 948 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (length1, 2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 0.25, 0.001); |
| 949 | |
| 950 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 951 | gsk_path_builder_add_segmentcxx . . $ gsk_path_builder_add_segment(9c2eab29f2d9e46). (builder, path, &point1, &point0); |
| 952 | path2 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 953 | |
| 954 | measure2 = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path2); |
| 955 | length2 = gsk_path_measure_get_lengthcxx . . $ gsk_path_measure_get_length(542aedd04bfccbf1). (measure2); |
| 956 | |
| 957 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (length2, 2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 0.75, 0.001); |
| 958 | |
| 959 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 960 | gsk_path_builder_add_reverse_pathcxx . . $ gsk_path_builder_add_reverse_path(ce30aa92f7d5e43b). (builder, path); |
| 961 | path3 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 962 | |
| 963 | measure3 = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path3); |
| 964 | length3 = gsk_path_measure_get_lengthcxx . . $ gsk_path_measure_get_length(542aedd04bfccbf1). (measure3); |
| 965 | |
| 966 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (length3, 2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`!, 0.001); |
| 967 | |
| 968 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_in_fill (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), GSK_FILL_RULE_WINDING)); |
| 969 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_in_fill (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), GSK_FILL_RULE_EVEN_ODD)); |
| 970 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_in_fill (path3, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), GSK_FILL_RULE_WINDING)); |
| 971 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_in_fill (path3, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), GSK_FILL_RULE_EVEN_ODD)); |
| 972 | |
| 973 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 974 | gsk_path_builder_add_pathcxx . . $ gsk_path_builder_add_path(ce30aa92f7d5e43b). (builder, path); |
| 975 | gsk_path_builder_move_tocxx . . $ gsk_path_builder_move_to(49a94c94a194fe45). (builder, -2, -2); |
| 976 | gsk_path_builder_line_tocxx . . $ gsk_path_builder_line_to(49a94c94a194fe45). (builder, 2, 0); |
| 977 | gsk_path_builder_line_tocxx . . $ gsk_path_builder_line_to(49a94c94a194fe45). (builder, 2, 2); |
| 978 | gsk_path_builder_line_tocxx . . $ gsk_path_builder_line_to(49a94c94a194fe45). (builder, -2, 2); |
| 979 | gsk_path_builder_closecxx . . $ gsk_path_builder_close(461b7a88b5bb50f9). (builder); |
| 980 | path4 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 981 | |
| 982 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_in_fill (path4, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), GSK_FILL_RULE_WINDING)); |
| 983 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_in_fill (path4, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), GSK_FILL_RULE_EVEN_ODD)); |
| 984 | |
| 985 | path5 = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). ("M 2 0 O 2 2 0 2 0.707 O -2 2 -2 0 0.707 O -2 -2 0 -2 0.707 O 2 -2 2 0 0.707 Z"); |
| 986 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 987 | gsk_path_builder_add_pathcxx . . $ gsk_path_builder_add_path(ce30aa92f7d5e43b). (builder, path); |
| 988 | gsk_path_builder_add_pathcxx . . $ gsk_path_builder_add_path(ce30aa92f7d5e43b). (builder, path5); |
| 989 | path6 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 990 | |
| 991 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_in_fill (path6, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), GSK_FILL_RULE_WINDING)); |
| 992 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_in_fill (path6, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), GSK_FILL_RULE_EVEN_ODD)); |
| 993 | |
| 994 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 995 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure1); |
| 996 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure2); |
| 997 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure3); |
| 998 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 999 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path1); |
| 1000 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path2); |
| 1001 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path3); |
| 1002 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path4); |
| 1003 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path5); |
| 1004 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path6); |
| 1005 | } |
| 1006 | |
| 1007 | static void |
| 1008 | test_lengthcxx . . $ test_length(49f6e7a06ebc5aa8). (void) |
| 1009 | { |
| 1010 | GskPathcxx . . $ GskPath# *path, *path1, *path2; |
| 1011 | GskPathMeasurecxx . . $ GskPathMeasure# *measure, *measure1, *measure2; |
| 1012 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1013 | GskPathPointcxx . . $ GskPathPoint# point, start, end; |
| 1014 | float length, length1, length2; |
| 1015 | float distance; |
| 1016 | float tolerance = 0.1; |
| 1017 | |
| 1018 | path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). ("M 0 0 Q 0 0 5 5"); |
| 1019 | measure = gsk_path_measure_new_with_tolerancecxx . . $ gsk_path_measure_new_with_tolerance(13938316874bf0f8). (path, tolerance); |
| 1020 | length = gsk_path_measure_get_lengthcxx . . $ gsk_path_measure_get_length(542aedd04bfccbf1). (measure); |
| 1021 | |
| 1022 | gsk_path_get_start_pointcxx . . $ gsk_path_get_start_point(3459fba3d60e75a). (path, &start); |
| 1023 | gsk_path_get_end_pointcxx . . $ gsk_path_get_end_point(3459fba3d60e75a). (path, &end); |
| 1024 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, length / 2, &point); |
| 1025 | distance = gsk_path_point_get_distancecxx . . $ gsk_path_point_get_distance(a5bfe9536088c507). (&point, measure); |
| 1026 | |
| 1027 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (length / 2, distance, 0.1); |
| 1028 | |
| 1029 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1030 | gsk_path_builder_add_segmentcxx . . $ gsk_path_builder_add_segment(9c2eab29f2d9e46). (builder, path, &start, &point); |
| 1031 | path1 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1032 | measure1 = gsk_path_measure_new_with_tolerancecxx . . $ gsk_path_measure_new_with_tolerance(13938316874bf0f8). (path1, tolerance); |
| 1033 | length1 = gsk_path_measure_get_lengthcxx . . $ gsk_path_measure_get_length(542aedd04bfccbf1). (measure1); |
| 1034 | |
| 1035 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1036 | gsk_path_builder_add_segmentcxx . . $ gsk_path_builder_add_segment(9c2eab29f2d9e46). (builder, path, &point, &end); |
| 1037 | path2 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1038 | measure2 = gsk_path_measure_new_with_tolerancecxx . . $ gsk_path_measure_new_with_tolerance(13938316874bf0f8). (path2, tolerance); |
| 1039 | length2 = gsk_path_measure_get_lengthcxx . . $ gsk_path_measure_get_length(542aedd04bfccbf1). (measure2); |
| 1040 | |
| 1041 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (length, length1 + length2, tolerance); |
| 1042 | |
| 1043 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1044 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path1); |
| 1045 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path2); |
| 1046 | |
| 1047 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 1048 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure1); |
| 1049 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure2); |
| 1050 | } |
| 1051 | |
| 1052 | static void |
| 1053 | test_rect_segmentcxx . . $ test_rect_segment(49f6e7a06ebc5aa8). (void) |
| 1054 | { |
| 1055 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1056 | GskPathcxx . . $ GskPath# *path, *path1, *path2; |
| 1057 | GskPathMeasurecxx . . $ GskPathMeasure# *measure, *measure1, *measure2; |
| 1058 | GskPathPointcxx . . $ GskPathPoint# point0, point1; |
| 1059 | |
| 1060 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1061 | gsk_path_builder_add_rectcxx . . $ gsk_path_builder_add_rect(c725039549b6e876). (builder, &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (0, 0, 100, 100)); |
| 1062 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1063 | measure = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path); |
| 1064 | |
| 1065 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 20, &point0); |
| 1066 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 80, &point1); |
| 1067 | |
| 1068 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1069 | gsk_path_builder_add_segmentcxx . . $ gsk_path_builder_add_segment(9c2eab29f2d9e46). (builder, path, &point0, &point1); |
| 1070 | path1 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1071 | measure1 = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path1); |
| 1072 | |
| 1073 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (gsk_path_measure_get_length (measure1), 60, 0.001); |
| 1074 | |
| 1075 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1076 | gsk_path_builder_add_segmentcxx . . $ gsk_path_builder_add_segment(9c2eab29f2d9e46). (builder, path, &point1, &point0); |
| 1077 | path2 = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1078 | measure2 = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path2); |
| 1079 | |
| 1080 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (gsk_path_measure_get_length (measure2), 340, 0.001); |
| 1081 | |
| 1082 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1083 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path1); |
| 1084 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path2); |
| 1085 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 1086 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure1); |
| 1087 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure2); |
| 1088 | } |
| 1089 | |
| 1090 | static void |
| 1091 | test_circle_pointcxx . . $ test_circle_point(49f6e7a06ebc5aa8). (void) |
| 1092 | { |
| 1093 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1094 | GskPathcxx . . $ GskPath# *path; |
| 1095 | GskPathPointcxx . . $ GskPathPoint# point; |
| 1096 | graphene_point_tcxx . . $ graphene_point_t# center; |
| 1097 | float k; |
| 1098 | |
| 1099 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1100 | gsk_path_builder_add_circlecxx . . $ gsk_path_builder_add_circle(cdf21b5c8721fb31). (builder, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (1, 2), 0); |
| 1101 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1102 | |
| 1103 | gsk_path_get_start_pointcxx . . $ gsk_path_get_start_point(3459fba3d60e75a). (path, &point); |
| 1104 | k = gsk_path_point_get_curvaturecxx . . $ gsk_path_point_get_curvature(bc6f92c49c99c393). (&point, path, GSK_PATH_TO_ENDcxx . . $ GSK_PATH_TO_END., ¢er); |
| 1105 | |
| 1106 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (k == INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!); |
| 1107 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (¢er, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (1, 2))); |
| 1108 | |
| 1109 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1110 | } |
| 1111 | |
| 1112 | static void |
| 1113 | test_rect_plaincxx . . $ test_rect_plain(49f6e7a06ebc5aa8). (void) |
| 1114 | { |
| 1115 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1116 | GskPathcxx . . $ GskPath# *path; |
| 1117 | GskPathMeasurecxx . . $ GskPathMeasure# *measure; |
| 1118 | GskPathPointcxx . . $ GskPathPoint# point; |
| 1119 | graphene_point_tcxx . . $ graphene_point_t# pos; |
| 1120 | graphene_vec2_tcxx . . $ graphene_vec2_t# tan, v; |
| 1121 | char *s; |
| 1122 | |
| 1123 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1124 | gsk_path_builder_add_rectcxx . . $ gsk_path_builder_add_rect(c725039549b6e876). (builder, &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (10, 10, 100, 200)); |
| 1125 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1126 | |
| 1127 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 1128 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 10 10 h 100 v 200 h -100 z"); |
| 1129 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 1130 | |
| 1131 | measure = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path); |
| 1132 | |
| 1133 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_measure_get_length (measure) == 600); |
| 1134 | |
| 1135 | gsk_path_get_start_pointcxx . . $ gsk_path_get_start_point(3459fba3d60e75a). (path, &point); |
| 1136 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1137 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10))); |
| 1138 | |
| 1139 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_STARTcxx . . $ GSK_PATH_FROM_START., &tan); |
| 1140 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 0, -1))); |
| 1141 | |
| 1142 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_STARTcxx . . $ GSK_PATH_TO_START., &tan); |
| 1143 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 0, 1))); |
| 1144 | |
| 1145 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_ENDcxx . . $ GSK_PATH_FROM_END., &tan); |
| 1146 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, -1, 0))); |
| 1147 | |
| 1148 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_ENDcxx . . $ GSK_PATH_TO_END., &tan); |
| 1149 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 1, 0))); |
| 1150 | |
| 1151 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 100, &point); |
| 1152 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1153 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (110, 10))); |
| 1154 | |
| 1155 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_STARTcxx . . $ GSK_PATH_FROM_START., &tan); |
| 1156 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 1, 0))); |
| 1157 | |
| 1158 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_STARTcxx . . $ GSK_PATH_TO_START., &tan); |
| 1159 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, -1, 0))); |
| 1160 | |
| 1161 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_ENDcxx . . $ GSK_PATH_FROM_END., &tan); |
| 1162 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 0, -1))); |
| 1163 | |
| 1164 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_ENDcxx . . $ GSK_PATH_TO_END., &tan); |
| 1165 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 0, 1))); |
| 1166 | |
| 1167 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 300, &point); |
| 1168 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1169 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (110, 210))); |
| 1170 | |
| 1171 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_STARTcxx . . $ GSK_PATH_FROM_START., &tan); |
| 1172 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 0, 1))); |
| 1173 | |
| 1174 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_STARTcxx . . $ GSK_PATH_TO_START., &tan); |
| 1175 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 0, -1))); |
| 1176 | |
| 1177 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_ENDcxx . . $ GSK_PATH_FROM_END., &tan); |
| 1178 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 1, 0))); |
| 1179 | |
| 1180 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_ENDcxx . . $ GSK_PATH_TO_END., &tan); |
| 1181 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, -1, 0))); |
| 1182 | |
| 1183 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 1184 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1185 | } |
| 1186 | |
| 1187 | static void |
| 1188 | test_rect_zero_heightcxx . . $ test_rect_zero_height(49f6e7a06ebc5aa8). (void) |
| 1189 | { |
| 1190 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1191 | GskPathcxx . . $ GskPath# *path; |
| 1192 | GskPathMeasurecxx . . $ GskPathMeasure# *measure; |
| 1193 | GskPathPointcxx . . $ GskPathPoint# point; |
| 1194 | graphene_point_tcxx . . $ graphene_point_t# pos; |
| 1195 | graphene_vec2_tcxx . . $ graphene_vec2_t# tan, v; |
| 1196 | char *s; |
| 1197 | |
| 1198 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1199 | gsk_path_builder_add_rectcxx . . $ gsk_path_builder_add_rect(c725039549b6e876). (builder, &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (10, 10, 100, 0)); |
| 1200 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1201 | |
| 1202 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 1203 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 10 10 h 100 v 0 h -100 z"); |
| 1204 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 1205 | |
| 1206 | measure = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path); |
| 1207 | |
| 1208 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_measure_get_length (measure) == 200); |
| 1209 | |
| 1210 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 100, &point); |
| 1211 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1212 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (110, 10))); |
| 1213 | |
| 1214 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_STARTcxx . . $ GSK_PATH_FROM_START., &tan); |
| 1215 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 1, 0))); |
| 1216 | |
| 1217 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_STARTcxx . . $ GSK_PATH_TO_START., &tan); |
| 1218 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, -1, 0))); |
| 1219 | |
| 1220 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_ENDcxx . . $ GSK_PATH_FROM_END., &tan); |
| 1221 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 1, 0))); |
| 1222 | |
| 1223 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_ENDcxx . . $ GSK_PATH_TO_END., &tan); |
| 1224 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, -1, 0))); |
| 1225 | |
| 1226 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 1227 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1228 | } |
| 1229 | |
| 1230 | static void |
| 1231 | test_rect_zero_widthcxx . . $ test_rect_zero_width(49f6e7a06ebc5aa8). (void) |
| 1232 | { |
| 1233 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1234 | GskPathcxx . . $ GskPath# *path; |
| 1235 | GskPathMeasurecxx . . $ GskPathMeasure# *measure; |
| 1236 | GskPathPointcxx . . $ GskPathPoint# point; |
| 1237 | graphene_point_tcxx . . $ graphene_point_t# pos; |
| 1238 | graphene_vec2_tcxx . . $ graphene_vec2_t# tan, v; |
| 1239 | char *s; |
| 1240 | |
| 1241 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1242 | gsk_path_builder_add_rectcxx . . $ gsk_path_builder_add_rect(c725039549b6e876). (builder, &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (10, 10, 0, 100)); |
| 1243 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1244 | |
| 1245 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 1246 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 10 10 h 0 v 100 h -0 z"); |
| 1247 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 1248 | |
| 1249 | measure = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path); |
| 1250 | |
| 1251 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_measure_get_length (measure) == 200); |
| 1252 | |
| 1253 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 100, &point); |
| 1254 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1255 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 110))); |
| 1256 | |
| 1257 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_STARTcxx . . $ GSK_PATH_FROM_START., &tan); |
| 1258 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 0, 1))); |
| 1259 | |
| 1260 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_STARTcxx . . $ GSK_PATH_TO_START., &tan); |
| 1261 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 0, -1))); |
| 1262 | |
| 1263 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_ENDcxx . . $ GSK_PATH_FROM_END., &tan); |
| 1264 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 0, 1))); |
| 1265 | |
| 1266 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_TO_ENDcxx . . $ GSK_PATH_TO_END., &tan); |
| 1267 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_init (&v, 0, -1))); |
| 1268 | |
| 1269 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 1270 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1271 | } |
| 1272 | |
| 1273 | static void |
| 1274 | test_rect_zerocxx . . $ test_rect_zero(49f6e7a06ebc5aa8). (void) |
| 1275 | { |
| 1276 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1277 | GskPathcxx . . $ GskPath# *path; |
| 1278 | GskPathMeasurecxx . . $ GskPathMeasure# *measure; |
| 1279 | GskPathPointcxx . . $ GskPathPoint# point; |
| 1280 | graphene_point_tcxx . . $ graphene_point_t# pos; |
| 1281 | graphene_vec2_tcxx . . $ graphene_vec2_t# tan; |
| 1282 | |
| 1283 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1284 | gsk_path_builder_add_rectcxx . . $ gsk_path_builder_add_rect(c725039549b6e876). (builder, &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (10, 10, 0, 0)); |
| 1285 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1286 | measure = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path); |
| 1287 | |
| 1288 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_measure_get_length (measure) == 0); |
| 1289 | |
| 1290 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 0, &point); |
| 1291 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1292 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_equal (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10))); |
| 1293 | |
| 1294 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (&point, path, GSK_PATH_FROM_STARTcxx . . $ GSK_PATH_FROM_START., &tan); |
| 1295 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_equal (&tan, graphene_vec2_zero ())); |
| 1296 | |
| 1297 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 1298 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1299 | } |
| 1300 | |
| 1301 | static void |
| 1302 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (const GskPathPointcxx . . $ GskPathPoint# *point, |
| 1303 | GskPathcxx . . $ GskPath# *path, |
| 1304 | const graphene_point_tcxx . . $ graphene_point_t# *pos, |
| 1305 | const graphene_vec2_tcxx . . $ graphene_vec2_t# *tan1, |
| 1306 | const graphene_vec2_tcxx . . $ graphene_vec2_t# *tan2, |
| 1307 | float k1, |
| 1308 | float k2) |
| 1309 | { |
| 1310 | graphene_point_tcxx . . $ graphene_point_t# p; |
| 1311 | graphene_vec2_tcxx . . $ graphene_vec2_t# tan; |
| 1312 | float ka1, ka2; |
| 1313 | |
| 1314 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (point, path, &p); |
| 1315 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (pos, &p, 0.0001)); |
| 1316 | |
| 1317 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (point, path, GSK_PATH_FROM_STARTcxx . . $ GSK_PATH_FROM_START., &tan); |
| 1318 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_near (tan1, &tan, 0.0001)); |
| 1319 | |
| 1320 | gsk_path_point_get_tangentcxx . . $ gsk_path_point_get_tangent(26cb8992d33b278e). (point, path, GSK_PATH_TO_ENDcxx . . $ GSK_PATH_TO_END., &tan); |
| 1321 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_vec2_near (tan2, &tan, 0.0001)); |
| 1322 | |
| 1323 | ka1 = gsk_path_point_get_curvaturecxx . . $ gsk_path_point_get_curvature(bc6f92c49c99c393). (point, path, GSK_PATH_FROM_STARTcxx . . $ GSK_PATH_FROM_START., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1324 | if (isfinitecxx . . $ `<external>/11263917310783833665/math.h:963:11`! (k1) && isfinitecxx . . $ `<external>/11263917310783833665/math.h:963:11`! (ka1)) |
| 1325 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (k1, ka1, 0.0001); |
| 1326 | else |
| 1327 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (isinfcxx . . $ `<external>/11263917310783833665/math.h:999:11`! (k1) && isinfcxx . . $ `<external>/11263917310783833665/math.h:999:11`! (ka1)); |
| 1328 | |
| 1329 | ka2 = gsk_path_point_get_curvaturecxx . . $ gsk_path_point_get_curvature(bc6f92c49c99c393). (point, path, GSK_PATH_TO_ENDcxx . . $ GSK_PATH_TO_END., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1330 | if (isfinitecxx . . $ `<external>/11263917310783833665/math.h:963:11`! (k2) && isfinitecxx . . $ `<external>/11263917310783833665/math.h:963:11`! (ka2)) |
| 1331 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (k2, ka2, 0.0001); |
| 1332 | else |
| 1333 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (isinfcxx . . $ `<external>/11263917310783833665/math.h:999:11`! (k2) && isinfcxx . . $ `<external>/11263917310783833665/math.h:999:11`! (ka2)); |
| 1334 | } |
| 1335 | |
| 1336 | static void |
| 1337 | test_zero_lengthcxx . . $ test_zero_length(49f6e7a06ebc5aa8). (void) |
| 1338 | { |
| 1339 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1340 | GskPathcxx . . $ GskPath# *path; |
| 1341 | char *s; |
| 1342 | graphene_rect_tcxx . . $ graphene_rect_t# bounds; |
| 1343 | GskPathPointcxx . . $ GskPathPoint# point; |
| 1344 | graphene_vec2_tcxx . . $ graphene_vec2_t# v1, v2; |
| 1345 | |
| 1346 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1347 | gsk_path_builder_move_tocxx . . $ gsk_path_builder_move_to(49a94c94a194fe45). (builder, 10, 10); |
| 1348 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1349 | |
| 1350 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_is_empty (path)); |
| 1351 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_is_closed (path)); |
| 1352 | |
| 1353 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 1354 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 10 10"); |
| 1355 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 1356 | |
| 1357 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_get_bounds (path, &bounds)); |
| 1358 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_rect_equal (&bounds, &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (10, 10, 0, 0))); |
| 1359 | |
| 1360 | g_assert_falsecxx . . $ `<external>/15287032793271088244/gtestutils.h:232:9`! (gsk_path_in_fill (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), GSK_FILL_RULE_WINDING)); |
| 1361 | |
| 1362 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_get_closest_point (path, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, 0), INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, &point, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)); |
| 1363 | |
| 1364 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1365 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10), |
| 1366 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, 0), |
| 1367 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 0, 0), |
| 1368 | 0, 0); |
| 1369 | |
| 1370 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_get_start_point (path, &point)); |
| 1371 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1372 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10), |
| 1373 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, 0), |
| 1374 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 0, 0), |
| 1375 | 0, 0); |
| 1376 | |
| 1377 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (gsk_path_get_end_point (path, &point)); |
| 1378 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1379 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10), |
| 1380 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, 0), |
| 1381 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 0, 0), |
| 1382 | 0, 0); |
| 1383 | |
| 1384 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1385 | } |
| 1386 | |
| 1387 | static void |
| 1388 | test_rounded_rect_plaincxx . . $ test_rounded_rect_plain(49f6e7a06ebc5aa8). (void) |
| 1389 | { |
| 1390 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1391 | GskPathcxx . . $ GskPath# *path; |
| 1392 | GskPathMeasurecxx . . $ GskPathMeasure# *measure; |
| 1393 | GskPathPointcxx . . $ GskPathPoint# point; |
| 1394 | GskRoundedRectcxx . . $ GskRoundedRect# rect; |
| 1395 | graphene_vec2_tcxx . . $ graphene_vec2_t# v1, v2; |
| 1396 | graphene_point_tcxx . . $ graphene_point_t# pos; |
| 1397 | char *s; |
| 1398 | |
| 1399 | rect.boundscxx . . $ _GskRoundedRect#bounds. = GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (10, 10, 100, 200); |
| 1400 | rect.cornercxx . . $ _GskRoundedRect#corner.[0] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (10, 10); |
| 1401 | rect.cornercxx . . $ _GskRoundedRect#corner.[1] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (10, 10); |
| 1402 | rect.cornercxx . . $ _GskRoundedRect#corner.[2] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (10, 10); |
| 1403 | rect.cornercxx . . $ _GskRoundedRect#corner.[3] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (10, 10); |
| 1404 | |
| 1405 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1406 | gsk_path_builder_add_rounded_rectcxx . . $ gsk_path_builder_add_rounded_rect(db15c65509282908). (builder, &rect); |
| 1407 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1408 | |
| 1409 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 1410 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 20 10 L 100 10 O 110 10, 110 20, 0.707106769 L 110 200 O 110 210, 100 210, 0.707106769 L 20 210 O 10 210, 10 200, 0.707106769 L 10 20 O 10 10, 20 10, 0.707106769 Z"); |
| 1411 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 1412 | |
| 1413 | measure = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path); |
| 1414 | |
| 1415 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (gsk_path_measure_get_length (measure), |
| 1416 | 600 - 4 * 20 + 2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 10, |
| 1417 | 0.0001); |
| 1418 | |
| 1419 | gsk_path_get_start_pointcxx . . $ gsk_path_get_start_point(3459fba3d60e75a). (path, &point); |
| 1420 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1421 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (20, 10), 0.0001)); |
| 1422 | |
| 1423 | /* Checking the curvature with the measured points is difficult, |
| 1424 | * because rounding might put us on the arc. Therefore, set points |
| 1425 | * precisely for these checks. |
| 1426 | */ |
| 1427 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1428 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 1; |
| 1429 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1430 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1431 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (20, 10), |
| 1432 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 1, 0), |
| 1433 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 1, 0), |
| 1434 | 0.1, 0); |
| 1435 | |
| 1436 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 80, &point); |
| 1437 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1438 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (100, 10), 0.0001)); |
| 1439 | |
| 1440 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1441 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 2; |
| 1442 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1443 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1444 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (100, 10), |
| 1445 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 1, 0), |
| 1446 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 1, 0), |
| 1447 | 0, 0.1); |
| 1448 | |
| 1449 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 80 + (2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 10)/4, &point); |
| 1450 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1451 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (110, 20), 0.0001)); |
| 1452 | |
| 1453 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1454 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 3; |
| 1455 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1456 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1457 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (110, 20), |
| 1458 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, 1), |
| 1459 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 0, 1), |
| 1460 | 0.1, 0); |
| 1461 | |
| 1462 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 80 + (2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 10)/4 + 180, &point); |
| 1463 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1464 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (110, 200), 0.0001)); |
| 1465 | |
| 1466 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1467 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 4; |
| 1468 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1469 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1470 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (110, 200), |
| 1471 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, 1), |
| 1472 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 0, 1), |
| 1473 | 0, 0.1); |
| 1474 | |
| 1475 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 80 + 180 + (2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 10)/2, &point); |
| 1476 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1477 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (100, 210), 0.00001)); |
| 1478 | |
| 1479 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1480 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 5; |
| 1481 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1482 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1483 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (100, 210), |
| 1484 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, -1, 0), |
| 1485 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, -1, 0), |
| 1486 | 0.1, 0); |
| 1487 | |
| 1488 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 80 + 180 + 80 + (2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 10)/2, &point); |
| 1489 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1490 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (20, 210), 0.00001)); |
| 1491 | |
| 1492 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1493 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 6; |
| 1494 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1495 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1496 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (20, 210), |
| 1497 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, -1, 0), |
| 1498 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, -1, 0), |
| 1499 | 0, 0.1); |
| 1500 | |
| 1501 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 80 + 180 + 80 + (2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 10)*3/4, &point); |
| 1502 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1503 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 200), 0.00001)); |
| 1504 | |
| 1505 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1506 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 7; |
| 1507 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1508 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1509 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 200), |
| 1510 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, -1), |
| 1511 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 0, -1), |
| 1512 | 0.1, 0); |
| 1513 | |
| 1514 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, 80 + 180 + 80 + 180 + (2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 10)*3/4, &point); |
| 1515 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1516 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 20), 0.00001)); |
| 1517 | |
| 1518 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1519 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 8; |
| 1520 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1521 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1522 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 20), |
| 1523 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, -1), |
| 1524 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 0, -1), |
| 1525 | 0, 0.1); |
| 1526 | |
| 1527 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 1528 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1529 | } |
| 1530 | |
| 1531 | static void |
| 1532 | test_rounded_rect_trickycxx . . $ test_rounded_rect_tricky(49f6e7a06ebc5aa8). (void) |
| 1533 | { |
| 1534 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1535 | GskPathcxx . . $ GskPath# *path; |
| 1536 | GskPathMeasurecxx . . $ GskPathMeasure# *measure; |
| 1537 | GskPathPointcxx . . $ GskPathPoint# point; |
| 1538 | GskRoundedRectcxx . . $ GskRoundedRect# rect; |
| 1539 | graphene_vec2_tcxx . . $ graphene_vec2_t# v1, v2; |
| 1540 | graphene_point_tcxx . . $ graphene_point_t# pos; |
| 1541 | char *s; |
| 1542 | |
| 1543 | rect.boundscxx . . $ _GskRoundedRect#bounds. = GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (10, 10, 100, 200); |
| 1544 | rect.cornercxx . . $ _GskRoundedRect#corner.[0] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (0, 0); |
| 1545 | rect.cornercxx . . $ _GskRoundedRect#corner.[1] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (0, 100); |
| 1546 | rect.cornercxx . . $ _GskRoundedRect#corner.[2] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (0, 100); |
| 1547 | rect.cornercxx . . $ _GskRoundedRect#corner.[3] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (10, 10); |
| 1548 | |
| 1549 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1550 | gsk_path_builder_add_rounded_rectcxx . . $ gsk_path_builder_add_rounded_rect(db15c65509282908). (builder, &rect); |
| 1551 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1552 | |
| 1553 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 1554 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 10 10 L 110 10 L 110 110 L 110 210 L 20 210 O 10 210, 10 200, 0.707106769 L 10 10 Z"); |
| 1555 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 1556 | |
| 1557 | measure = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path); |
| 1558 | |
| 1559 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (gsk_path_measure_get_length (measure), |
| 1560 | 600 - 20 + (2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 10) / 4, |
| 1561 | 0.0001); |
| 1562 | |
| 1563 | gsk_path_get_start_pointcxx . . $ gsk_path_get_start_point(3459fba3d60e75a). (path, &point); |
| 1564 | gsk_path_point_get_positioncxx . . $ gsk_path_point_get_position(3ab26723ea47a13d). (&point, path, &pos); |
| 1565 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (graphene_point_near (&pos, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10), 0.0001)); |
| 1566 | |
| 1567 | /* Checking the curvature with the measured points is difficult, |
| 1568 | * because rounding might put us on the arc. Therefore, set points |
| 1569 | * precisely for these checks. |
| 1570 | */ |
| 1571 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1572 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 1; |
| 1573 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1574 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1575 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10), |
| 1576 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, -1), |
| 1577 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 1, 0), |
| 1578 | 0, 0); |
| 1579 | |
| 1580 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1581 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 2; |
| 1582 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1583 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1584 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (110, 10), |
| 1585 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 1, 0), |
| 1586 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, 1), |
| 1587 | 0, 0); |
| 1588 | |
| 1589 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1590 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 3; |
| 1591 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1592 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1593 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (110, 110), |
| 1594 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, 1), |
| 1595 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 0, 1), |
| 1596 | 0, 0); |
| 1597 | |
| 1598 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1599 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 4; |
| 1600 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1601 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1602 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (110, 210), |
| 1603 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, 1), |
| 1604 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, -1, 0), |
| 1605 | 0, 0); |
| 1606 | |
| 1607 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1608 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 5; |
| 1609 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1610 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1611 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (20, 210), |
| 1612 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, -1, 0), |
| 1613 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, -1, 0), |
| 1614 | 0, 0.1); |
| 1615 | |
| 1616 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1617 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 6; |
| 1618 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1619 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1620 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 200), |
| 1621 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 0, -1), |
| 1622 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 0, -1), |
| 1623 | 0.1, 0); |
| 1624 | |
| 1625 | point.contourcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#contour. = 0; |
| 1626 | point.idxcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#idx. = 7; |
| 1627 | point.tcxx . . $ _GskPathPoint#$anonymous_type_0#$anonymous_type_1#t. = 0; |
| 1628 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1629 | &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (10, 10), |
| 1630 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, -1), |
| 1631 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v2, 1, 0), |
| 1632 | 0, 0); |
| 1633 | |
| 1634 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 1635 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1636 | } |
| 1637 | |
| 1638 | static void |
| 1639 | test_rounded_rect_parsecxx . . $ test_rounded_rect_parse(49f6e7a06ebc5aa8). (void) |
| 1640 | { |
| 1641 | GskRoundedRectcxx . . $ GskRoundedRect# rr; |
| 1642 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1643 | GskPathcxx . . $ GskPath# *path, *path2; |
| 1644 | char *s; |
| 1645 | |
| 1646 | rr.boundscxx . . $ _GskRoundedRect#bounds. = GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (10, 10, 100, 111); |
| 1647 | rr.cornercxx . . $ _GskRoundedRect#corner.[GSK_CORNER_TOP_LEFTcxx . . $ GSK_CORNER_TOP_LEFT.] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (2, 4); |
| 1648 | rr.cornercxx . . $ _GskRoundedRect#corner.[GSK_CORNER_TOP_RIGHTcxx . . $ GSK_CORNER_TOP_RIGHT.] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (6, 8); |
| 1649 | rr.cornercxx . . $ _GskRoundedRect#corner.[GSK_CORNER_BOTTOM_RIGHTcxx . . $ GSK_CORNER_BOTTOM_RIGHT.] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (10, 12); |
| 1650 | rr.cornercxx . . $ _GskRoundedRect#corner.[GSK_CORNER_BOTTOM_LEFTcxx . . $ GSK_CORNER_BOTTOM_LEFT.] = GRAPHENE_SIZE_INITcxx . . $ `<external>/7544355427305202206/graphene-size.h:50:9`! (14, 16); |
| 1651 | |
| 1652 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1653 | gsk_path_builder_add_rounded_rectcxx . . $ gsk_path_builder_add_rounded_rect(db15c65509282908). (builder, &rr); |
| 1654 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1655 | |
| 1656 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 1657 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 12 10 L 104 10 O 110 10, 110 18, 0.707106769 L 110 109 O 110 121, 100 121, 0.707106769 L 24 121 O 10 121, 10 105, 0.707106769 L 10 14 O 10 10, 12 10, 0.707106769 Z"); |
| 1658 | |
| 1659 | path2 = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). (s); |
| 1660 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 1661 | |
| 1662 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path2); |
| 1663 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 12 10 L 104 10 O 110 10, 110 18, 0.707106769 L 110 109 O 110 121, 100 121, 0.707106769 L 24 121 O 10 121, 10 105, 0.707106769 L 10 14 O 10 10, 12 10, 0.707106769 Z"); |
| 1664 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 1665 | |
| 1666 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1667 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path2); |
| 1668 | } |
| 1669 | |
| 1670 | static void |
| 1671 | test_circle_plaincxx . . $ test_circle_plain(49f6e7a06ebc5aa8). (void) |
| 1672 | { |
| 1673 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1674 | GskPathcxx . . $ GskPath# *path; |
| 1675 | GskPathMeasurecxx . . $ GskPathMeasure# *measure; |
| 1676 | GskPathPointcxx . . $ GskPathPoint# point; |
| 1677 | graphene_vec2_tcxx . . $ graphene_vec2_t# v1; |
| 1678 | graphene_point_tcxx . . $ graphene_point_t# pos, center; |
| 1679 | char *s; |
| 1680 | float angle, radius; |
| 1681 | |
| 1682 | center = GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (100, 100); |
| 1683 | radius = 10; |
| 1684 | |
| 1685 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1686 | gsk_path_builder_add_circlecxx . . $ gsk_path_builder_add_circle(cdf21b5c8721fb31). (builder, ¢er, radius); |
| 1687 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1688 | |
| 1689 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 1690 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 110 100 o 0 10, -10 10, 0.707106769 o -10 0, -10 -10, 0.707106769 o 0 -10, 10 -10, 0.707106769 o 10 0, 10 10, 0.707106769 z"); |
| 1691 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 1692 | |
| 1693 | measure = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path); |
| 1694 | |
| 1695 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (gsk_path_measure_get_length (measure), |
| 1696 | 2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * radius, |
| 1697 | 0.0001); |
| 1698 | |
| 1699 | gsk_path_get_start_pointcxx . . $ gsk_path_get_start_point(3459fba3d60e75a). (path, &point); |
| 1700 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.idx == 1 && point.t == 0); |
| 1701 | |
| 1702 | gsk_path_get_end_pointcxx . . $ gsk_path_get_end_point(3459fba3d60e75a). (path, &point); |
| 1703 | g_assert_truecxx . . $ `<external>/15287032793271088244/gtestutils.h:227:9`! (point.idx == 5 && point.t == 1); |
| 1704 | |
| 1705 | for (int i = 0; i < 8; i++) |
| 1706 | { |
| 1707 | angle = 2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * (i + 1) / 8.f; |
| 1708 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, angle * radius, &point); |
| 1709 | |
| 1710 | pos = GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (100 + cosf (angle) * radius, 100 + sinf (angle) * radius); |
| 1711 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, - sinf (angle), cosf (angle)); |
| 1712 | |
| 1713 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1714 | &pos, |
| 1715 | &v1, &v1, |
| 1716 | 0.1, 0.1); |
| 1717 | } |
| 1718 | |
| 1719 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 1720 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1721 | } |
| 1722 | |
| 1723 | static void |
| 1724 | test_circle_zerocxx . . $ test_circle_zero(49f6e7a06ebc5aa8). (void) |
| 1725 | { |
| 1726 | GskPathBuildercxx . . $ GskPathBuilder# *builder; |
| 1727 | GskPathcxx . . $ GskPath# *path; |
| 1728 | GskPathMeasurecxx . . $ GskPathMeasure# *measure; |
| 1729 | GskPathPointcxx . . $ GskPathPoint# point; |
| 1730 | graphene_vec2_tcxx . . $ graphene_vec2_t# v1; |
| 1731 | graphene_point_tcxx . . $ graphene_point_t# pos, center; |
| 1732 | char *s; |
| 1733 | float angle, radius; |
| 1734 | |
| 1735 | center = GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (100, 100); |
| 1736 | radius = 0; |
| 1737 | |
| 1738 | builder = gsk_path_builder_newcxx . . $ gsk_path_builder_new(25eba19b8bc5acdf). (); |
| 1739 | gsk_path_builder_add_circlecxx . . $ gsk_path_builder_add_circle(cdf21b5c8721fb31). (builder, ¢er, radius); |
| 1740 | path = gsk_path_builder_free_to_pathcxx . . $ gsk_path_builder_free_to_path(615827be0524a7f2). (builder); |
| 1741 | |
| 1742 | s = gsk_path_to_stringcxx . . $ gsk_path_to_string(2701426875fded65). (path); |
| 1743 | g_assert_cmpstrcxx . . $ `<external>/15287032793271088244/gtestutils.h:46:9`! (s, ==, "M 100 100 o 0 0, 0 0, 0.707106769 o 0 0, 0 0, 0.707106769 o 0 0, 0 0, 0.707106769 o 0 0, 0 0, 0.707106769 z"); |
| 1744 | g_freecxx . . $ g_free(5d22bdacc48458e8). (s); |
| 1745 | |
| 1746 | measure = gsk_path_measure_newcxx . . $ gsk_path_measure_new(2e47e5a5a75cc263). (path); |
| 1747 | |
| 1748 | g_assert_cmpfloat_with_epsiloncxx . . $ `<external>/15287032793271088244/gtestutils.h:97:9`! (gsk_path_measure_get_length (measure), |
| 1749 | 2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * radius, |
| 1750 | 0.0001); |
| 1751 | |
| 1752 | for (int i = 0; i < 8; i++) |
| 1753 | { |
| 1754 | angle = 2 * M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * (i + 1) / 8.f; |
| 1755 | gsk_path_measure_get_pointcxx . . $ gsk_path_measure_get_point(ea012416ff6952e5). (measure, angle * radius, &point); |
| 1756 | |
| 1757 | pos = center; |
| 1758 | graphene_vec2_initcxx . . $ graphene_vec2_init(5226995649a41b16). (&v1, 0, 0); |
| 1759 | |
| 1760 | check_path_pointcxx . . $ check_path_point(d9dc9b32a6d0b1b3). (&point, path, |
| 1761 | &pos, |
| 1762 | &v1, &v1, |
| 1763 | INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!, INFINITYcxx . . $ `<external>/11263917310783833665/math.h:92:12`!); |
| 1764 | } |
| 1765 | |
| 1766 | gsk_path_measure_unrefcxx . . $ gsk_path_measure_unref(72f8802b581e39d7). (measure); |
| 1767 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1768 | } |
| 1769 | |
| 1770 | static void |
| 1771 | test_large_coord_conicscxx . . $ test_large_coord_conics(49f6e7a06ebc5aa8). (void) |
| 1772 | { |
| 1773 | GskPathcxx . . $ GskPath# *path = gsk_path_parsecxx . . $ gsk_path_parse(9b452774c48ef831). ("M 2 10 o 0 2, -2 2, 0.707106769 o -2 0, -2 -2, 0.707106769 o 0 -2, 2 -2, 0.707106769 o 2 0, 2 2, 0.707106769 z M 3000002 10 o 0 2, -2 2, 0.707106769 o -2 0, -2 -2, 0.707106769 o 0 -2, 2 -2, 0.70710676"); |
| 1774 | cairo_tcxx . . $ cairo_t# *cr; |
| 1775 | cairo_surface_tcxx . . $ cairo_surface_t# *surface; |
| 1776 | |
| 1777 | surface = cairo_image_surface_createcxx . . $ cairo_image_surface_create(f5323823c5d32b71). (CAIRO_FORMAT_ARGB32cxx . . $ CAIRO_FORMAT_ARGB32., 100, 100); |
| 1778 | cr = cairo_createcxx . . $ cairo_create(b6f0039b687ec546). (surface); |
| 1779 | |
| 1780 | /* Check that this does not cause a stack overflow due to |
| 1781 | * runaway recursion. |
| 1782 | */ |
| 1783 | gsk_path_to_cairocxx . . $ gsk_path_to_cairo(e9cfd9d763985906). (path, cr); |
| 1784 | |
| 1785 | cairo_surface_destroycxx . . $ cairo_surface_destroy(2fa2b40fabeeffa2). (surface); |
| 1786 | cairo_destroycxx . . $ cairo_destroy(21788b7825b29bf). (cr); |
| 1787 | |
| 1788 | gsk_path_unrefcxx . . $ gsk_path_unref(84da5b40fdd6197f). (path); |
| 1789 | } |
| 1790 | |
| 1791 | int |
| 1792 | maincxx . . $ main(afcd3168fc1188a4). (int argc, char *argv[]) |
| 1793 | { |
| 1794 | gtk_test_initcxx . . $ gtk_test_init(b91bcc5cc1349d78). (&argc, &argv, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 1795 | |
| 1796 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rsvg-parse", test_rsvg_parsecxx . . $ test_rsvg_parse(49f6e7a06ebc5aa8).); |
| 1797 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/empty", test_empty_pathcxx . . $ test_empty_path(49f6e7a06ebc5aa8).); |
| 1798 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rect/path", test_rect_pathcxx . . $ test_rect_path(49f6e7a06ebc5aa8).); |
| 1799 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/foreach", test_foreachcxx . . $ test_foreach(49f6e7a06ebc5aa8).); |
| 1800 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/point", test_path_pointcxx . . $ test_path_point(49f6e7a06ebc5aa8).); |
| 1801 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/segments", test_path_segmentscxx . . $ test_path_segments(49f6e7a06ebc5aa8).); |
| 1802 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/bad-in-fill", test_bad_in_fillcxx . . $ test_bad_in_fill(49f6e7a06ebc5aa8).); |
| 1803 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/unclosed-in-fill", test_unclosed_in_fillcxx . . $ test_unclosed_in_fill(49f6e7a06ebc5aa8).); |
| 1804 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/builder/add", test_path_builder_addcxx . . $ test_path_builder_add(49f6e7a06ebc5aa8).); |
| 1805 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rotated-arc", test_rotated_arccxx . . $ test_rotated_arc(49f6e7a06ebc5aa8).); |
| 1806 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rounded-rect/basic", test_rounded_rect_basiccxx . . $ test_rounded_rect_basic(49f6e7a06ebc5aa8).); |
| 1807 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rect/in-fill", test_rect_in_fillcxx . . $ test_rect_in_fill(49f6e7a06ebc5aa8).); |
| 1808 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/circle/basic", test_circle_basiccxx . . $ test_circle_basic(49f6e7a06ebc5aa8).); |
| 1809 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/length", test_lengthcxx . . $ test_length(49f6e7a06ebc5aa8).); |
| 1810 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rect/segment", test_rect_segmentcxx . . $ test_rect_segment(49f6e7a06ebc5aa8).); |
| 1811 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/circle/point", test_circle_pointcxx . . $ test_circle_point(49f6e7a06ebc5aa8).); |
| 1812 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rect/plain", test_rect_plaincxx . . $ test_rect_plain(49f6e7a06ebc5aa8).); |
| 1813 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rect/zero-height", test_rect_zero_heightcxx . . $ test_rect_zero_height(49f6e7a06ebc5aa8).); |
| 1814 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rect/zero-width", test_rect_zero_widthcxx . . $ test_rect_zero_width(49f6e7a06ebc5aa8).); |
| 1815 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rect/zero", test_rect_zerocxx . . $ test_rect_zero(49f6e7a06ebc5aa8).); |
| 1816 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rounded-rect/plain", test_rounded_rect_plaincxx . . $ test_rounded_rect_plain(49f6e7a06ebc5aa8).); |
| 1817 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rounded-rect/tricky", test_rounded_rect_trickycxx . . $ test_rounded_rect_tricky(49f6e7a06ebc5aa8).); |
| 1818 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/rounded-rect/parse", test_rounded_rect_parsecxx . . $ test_rounded_rect_parse(49f6e7a06ebc5aa8).); |
| 1819 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/circle/plain", test_circle_plaincxx . . $ test_circle_plain(49f6e7a06ebc5aa8).); |
| 1820 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/circle/zero", test_circle_zerocxx . . $ test_circle_zero(49f6e7a06ebc5aa8).); |
| 1821 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/zero-length", test_zero_lengthcxx . . $ test_zero_length(49f6e7a06ebc5aa8).); |
| 1822 | g_test_add_funccxx . . $ g_test_add_func(18fee6cbb4bb18a4). ("/path/large-coord-conics", test_large_coord_conicscxx . . $ test_large_coord_conics(49f6e7a06ebc5aa8).); |
| 1823 | |
| 1824 | return g_test_runcxx . . $ g_test_run(b126dc7c1de90089). (); |
| 1825 | } |