@@ -21,6 +21,7 @@ You should have received a copy of the GNU Affero General Public License
21
21
along with this program. If not, see <https://www.gnu.org/licenses/>.
22
22
*/
23
23
using System ;
24
+ using iText . Kernel . Geom ;
24
25
using iText . Svg . Exceptions ;
25
26
using iText . Svg . Renderers ;
26
27
using iText . Test ;
@@ -56,114 +57,182 @@ public virtual void LineTest() {
56
57
ConvertAndCompare ( sourceFolder , destinationFolder , "line" ) ;
57
58
}
58
59
59
- // TODO: DEVSIX-4018 add tests for all other types of path components
60
- // TODO: DEVSIX-4018 update cmp_ after fix (box for path is not implemented)
61
60
[ NUnit . Framework . Test ]
62
61
public virtual void PathLinesBasedTest ( ) {
63
62
ConvertAndCompare ( sourceFolder , destinationFolder , "pathLinesBased" ) ;
64
63
}
65
64
66
- // TODO: DEVSIX-4018 update cmp_ after fix (box for path is not implemented)
65
+ [ NUnit . Framework . Test ]
66
+ public virtual void PathLinesBasedTransformedTest ( ) {
67
+ ConvertAndCompare ( sourceFolder , destinationFolder , "pathLinesBasedTransformed" ) ;
68
+ }
69
+
67
70
[ NUnit . Framework . Test ]
68
71
public virtual void PathLinesBasedWithMoveTest ( ) {
69
72
ConvertAndCompare ( sourceFolder , destinationFolder , "pathLinesBasedWithMove" ) ;
70
73
}
71
74
72
- // TODO: DEVSIX-4018 update cmp_ after fix (box for path is not implemented)
73
75
[ NUnit . Framework . Test ]
74
76
public virtual void PathLinesBasedWithTwoFiguresTest ( ) {
75
77
ConvertAndCompare ( sourceFolder , destinationFolder , "pathLinesBasedWithTwoFigures" ) ;
76
78
}
77
79
78
80
[ NUnit . Framework . Test ]
79
81
public virtual void CubicBezierTest ( ) {
80
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
81
82
ConvertAndCompare ( sourceFolder , destinationFolder , "cubicBezier" ) ;
82
83
}
83
84
85
+ [ NUnit . Framework . Test ]
86
+ public virtual void CubicBezier2Test ( ) {
87
+ ConvertAndCompare ( sourceFolder , destinationFolder , "cubicBezier2" ) ;
88
+ }
89
+
90
+ [ NUnit . Framework . Test ]
91
+ public virtual void CubicBezier3Test ( ) {
92
+ ConvertAndCompare ( sourceFolder , destinationFolder , "cubicBezier3" ) ;
93
+ }
94
+
95
+ [ NUnit . Framework . Test ]
96
+ public virtual void CubicBezier4Test ( ) {
97
+ ConvertAndCompare ( sourceFolder , destinationFolder , "cubicBezier4" ) ;
98
+ }
99
+
100
+ [ NUnit . Framework . Test ]
101
+ public virtual void CubicBezierZeroDiscriminantTest ( ) {
102
+ // See CurveTo#calculateTValues to see which discriminant is mentioned.
103
+ ConvertAndCompare ( sourceFolder , destinationFolder , "cubicBezierZeroDiscriminant" ) ;
104
+ }
105
+
106
+ [ NUnit . Framework . Test ]
107
+ public virtual void CubicBezierNegativeDiscriminantTest ( ) {
108
+ // See CurveTo#calculateTValues to see which discriminant is mentioned.
109
+ ConvertAndCompare ( sourceFolder , destinationFolder , "cubicBezierNegativeDiscriminant" ) ;
110
+ }
111
+
84
112
[ NUnit . Framework . Test ]
85
113
public virtual void CubicBezierInsideOtherCubicBezierTest ( ) {
86
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
87
114
ConvertAndCompare ( sourceFolder , destinationFolder , "cubicBezierInsideOtherCubicBezier" ) ;
88
115
}
89
116
90
117
[ NUnit . Framework . Test ]
91
118
public virtual void SmoothCubicBezierWithAbsoluteCoordinatesTest ( ) {
92
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
93
119
ConvertAndCompare ( sourceFolder , destinationFolder , "smoothCubicBezierWithAbsoluteCoordinates" ) ;
94
120
}
95
121
96
122
[ NUnit . Framework . Test ]
97
123
public virtual void SmoothCubicBezierWithRelativeCoordinatesTest ( ) {
98
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
99
124
ConvertAndCompare ( sourceFolder , destinationFolder , "smoothCubicBezierWithRelativeCoordinates" ) ;
100
125
}
101
126
102
127
[ NUnit . Framework . Test ]
103
128
public virtual void SmoothCubicBezierRelativeAndAbsoluteCoordWithMoveTest ( ) {
104
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
105
129
ConvertAndCompare ( sourceFolder , destinationFolder , "smoothCubicBezierRelativeAndAbsoluteCoordWithMove" ) ;
106
130
}
107
131
108
132
[ NUnit . Framework . Test ]
109
133
public virtual void SmoothCubicBezierRelativeAndAbsoluteCoordNoZOperatorTest ( ) {
110
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
111
134
ConvertAndCompare ( sourceFolder , destinationFolder , "smoothCubicBezierRelativeAndAbsoluteCoordNoZOperator" ) ;
112
135
}
113
136
114
137
[ NUnit . Framework . Test ]
115
138
public virtual void QuadraticBezierTest ( ) {
116
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
117
139
ConvertAndCompare ( sourceFolder , destinationFolder , "quadraticBezier" ) ;
118
140
}
119
141
142
+ [ NUnit . Framework . Test ]
143
+ public virtual void QuadraticBezier2Test ( ) {
144
+ ConvertAndCompare ( sourceFolder , destinationFolder , "quadraticBezier2" ) ;
145
+ }
146
+
147
+ [ NUnit . Framework . Test ]
148
+ public virtual void QuadraticBezier3Test ( ) {
149
+ ConvertAndCompare ( sourceFolder , destinationFolder , "quadraticBezier3" ) ;
150
+ }
151
+
120
152
[ NUnit . Framework . Test ]
121
153
public virtual void QuadraticBezierInsideOtherQuadraticBezierTest ( ) {
122
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
123
154
ConvertAndCompare ( sourceFolder , destinationFolder , "quadraticBezierInsideOtherQuadraticBezier" ) ;
124
155
}
125
156
126
157
[ NUnit . Framework . Test ]
127
158
public virtual void SmoothQuadraticBezierWithAbsoluteCoordinatesTest ( ) {
128
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
129
159
ConvertAndCompare ( sourceFolder , destinationFolder , "smoothQuadraticBezierWithAbsoluteCoordinates" ) ;
130
160
}
131
161
132
162
[ NUnit . Framework . Test ]
133
163
public virtual void SmoothQuadraticBezierWithRelativeCoordinatesTest ( ) {
134
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
135
164
ConvertAndCompare ( sourceFolder , destinationFolder , "smoothQuadraticBezierWithRelativeCoordinates" ) ;
136
165
}
137
166
138
167
[ NUnit . Framework . Test ]
139
168
public virtual void SmoothQuadraticBezierAbsoluteAndRelativeCoordWithMoveTest ( ) {
140
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
141
169
ConvertAndCompare ( sourceFolder , destinationFolder , "smoothQuadraticBezierAbsoluteAndRelativeCoordWithMove"
142
170
) ;
143
171
}
144
172
145
173
[ NUnit . Framework . Test ]
146
174
public virtual void SmoothQuadraticBezierRelativeAndAbsoluteCoordNoZOperatorTest ( ) {
147
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
148
175
ConvertAndCompare ( sourceFolder , destinationFolder , "smoothQuadraticBezierRelativeAndAbsoluteCoordNoZOperator"
149
176
) ;
150
177
}
151
178
152
179
[ NUnit . Framework . Test ]
153
180
public virtual void EllipticalArcsTest ( ) {
154
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
155
181
ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcs" ) ;
156
182
}
157
183
184
+ [ NUnit . Framework . Test ]
185
+ public virtual void EllipticalArcsNegativeRxRyTest ( ) {
186
+ ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcsNegativeRxRy" ) ;
187
+ }
188
+
189
+ [ NUnit . Framework . Test ]
190
+ public virtual void EllipticalArcZeroRxRyTest ( ) {
191
+ ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcZeroRxRy" ) ;
192
+ }
193
+
194
+ [ NUnit . Framework . Test ]
195
+ public virtual void EllipticalArcsWithPhiTest ( ) {
196
+ ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcsWithPhi" , PageSize . A3 . Rotate ( ) ) ;
197
+ }
198
+
199
+ [ NUnit . Framework . Test ]
200
+ public virtual void EllipticalArcsWithPhi0Test ( ) {
201
+ ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcsWithPhi0" ) ;
202
+ }
203
+
204
+ [ NUnit . Framework . Test ]
205
+ public virtual void EllipticalArcsWithPhi90Test ( ) {
206
+ ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcsWithPhi90" ) ;
207
+ }
208
+
209
+ [ NUnit . Framework . Test ]
210
+ public virtual void EllipticalArcsWithPhi180Test ( ) {
211
+ ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcsWithPhi180" ) ;
212
+ }
213
+
214
+ [ NUnit . Framework . Test ]
215
+ public virtual void EllipticalArcsWithPhi270Test ( ) {
216
+ ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcsWithPhi270" ) ;
217
+ }
218
+
219
+ [ NUnit . Framework . Test ]
220
+ public virtual void EllipticalArcsWithPhiRelativeTest ( ) {
221
+ ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcsWithPhiRelative" ) ;
222
+ }
223
+
224
+ [ NUnit . Framework . Test ]
225
+ public virtual void EllipticalArcsWithPhiAbsoluteTest ( ) {
226
+ ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcsWithPhiAbsolute" ) ;
227
+ }
228
+
158
229
[ NUnit . Framework . Test ]
159
230
public virtual void EllipticalArcsRelativeCoordinatesTest ( ) {
160
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
161
231
ConvertAndCompare ( sourceFolder , destinationFolder , "ellipticalArcsRelativeCoordinates" ) ;
162
232
}
163
233
164
234
[ NUnit . Framework . Test ]
165
235
public virtual void ArcInsideOtherEllipticalArcTest ( ) {
166
- // TODO: update cmp-file after DEVSIX-4018 will be fixed
167
236
ConvertAndCompare ( sourceFolder , destinationFolder , "arcInsideOtherEllipticalArc" ) ;
168
237
}
169
238
@@ -246,13 +315,90 @@ public virtual void RectWithMultipleTransformsTest() {
246
315
ConvertAndCompare ( sourceFolder , destinationFolder , "rectWithMultipleTransforms" ) ;
247
316
}
248
317
249
- // TODO: DEVSIX-4018 update cmp_ after fix (box for text is not implemented)
250
318
[ NUnit . Framework . Test ]
251
319
[ LogMessage ( iText . StyledXmlParser . LogMessageConstant . UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED ) ]
252
320
public virtual void TextTest ( ) {
321
+ // TODO DEVSIX-4140 remove log message check and update cmp
253
322
ConvertAndCompare ( sourceFolder , destinationFolder , "text" ) ;
254
323
}
255
324
325
+ [ NUnit . Framework . Test ]
326
+ public virtual void TextNestedTSpansTest ( ) {
327
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textNestedTSpansTest" ) ;
328
+ }
329
+
330
+ [ NUnit . Framework . Test ]
331
+ [ LogMessage ( iText . StyledXmlParser . LogMessageConstant . UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED ) ]
332
+ public virtual void TextRotatedTest ( ) {
333
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textRotatedTest" ) ;
334
+ }
335
+
336
+ [ NUnit . Framework . Test ]
337
+ public virtual void TextDxTest ( ) {
338
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textDxTest" ) ;
339
+ }
340
+
341
+ [ NUnit . Framework . Test ]
342
+ public virtual void TextDyTest ( ) {
343
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textDyTest" ) ;
344
+ }
345
+
346
+ [ NUnit . Framework . Test ]
347
+ public virtual void TextXYOffset ( ) {
348
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textXYOffset" ) ;
349
+ }
350
+
351
+ [ NUnit . Framework . Test ]
352
+ public virtual void TextXOffset ( ) {
353
+ // TODO DEVSIX-4143 change cmp file after fixing
354
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textXOffset" ) ;
355
+ }
356
+
357
+ [ NUnit . Framework . Test ]
358
+ public virtual void TextXYDxDyOffset ( ) {
359
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textXYDxDyOffset" ) ;
360
+ }
361
+
362
+ [ NUnit . Framework . Test ]
363
+ public virtual void TextGradientEmUnits ( ) {
364
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textGradientEmUnits" ) ;
365
+ }
366
+
367
+ [ NUnit . Framework . Test ]
368
+ // TODO DEVSIX-4140 update cmp file
369
+ [ LogMessage ( iText . StyledXmlParser . LogMessageConstant . UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED ) ]
370
+ public virtual void TextGradientEmUnitsRelated ( ) {
371
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textGradientEmUnitsRelated" ) ;
372
+ }
373
+
374
+ [ NUnit . Framework . Test ]
375
+ // TODO DEVSIX-4140 update cmp file
376
+ [ LogMessage ( iText . StyledXmlParser . LogMessageConstant . UNKNOWN_ABSOLUTE_METRIC_LENGTH_PARSED ) ]
377
+ public virtual void TextGradientEmUnitsRelatedNotDefs ( ) {
378
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textGradientEmUnitsRelatedNotDefs" ) ;
379
+ }
380
+
381
+ [ NUnit . Framework . Test ]
382
+ public virtual void TextGradientEmUnitsRelatedDefault ( ) {
383
+ // TODO DEVSIX-4140 update cmp file
384
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textGradientEmUnitsRelatedDefault" ) ;
385
+ }
386
+
387
+ [ NUnit . Framework . Test ]
388
+ public virtual void TextGradientExUnits ( ) {
389
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textGradientExUnits" ) ;
390
+ }
391
+
392
+ [ NUnit . Framework . Test ]
393
+ public virtual void TextGradientRemUnits ( ) {
394
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textGradientRemUnits" ) ;
395
+ }
396
+
397
+ [ NUnit . Framework . Test ]
398
+ public virtual void TextGradientRemUnitsNestedSvg ( ) {
399
+ ConvertAndCompare ( sourceFolder , destinationFolder , "textGradientRemUnitsNestedSvg" ) ;
400
+ }
401
+
256
402
[ NUnit . Framework . Test ]
257
403
public virtual void RectMultipleStopsWithSameOffsetAndZeroCoordLengthPadTest ( ) {
258
404
ConvertAndCompare ( sourceFolder , destinationFolder , "rectMultipleStopsWithSameOffsetAndZeroCoordLengthPad" ) ;
@@ -320,6 +466,7 @@ public virtual void UserSpaceOnUseWithChUnitTest() {
320
466
321
467
[ NUnit . Framework . Test ]
322
468
public virtual void UserSpaceOnUseWithUnitsRelativeToFontTest ( ) {
469
+ // TODO DEVSIX-4140 update after fix
323
470
ConvertAndCompare ( sourceFolder , destinationFolder , "userSpaceOnUseWithUnitsRelativeToFont" ) ;
324
471
}
325
472
@@ -331,7 +478,7 @@ public virtual void UserSpaceOnUseWithUnitsRelativeToViewportTest() {
331
478
332
479
[ NUnit . Framework . Test ]
333
480
public virtual void UserSpaceOnUseDiffRelativeUnitsInGradientTest ( ) {
334
- // TODO: DEVSIX-3596 update cmp_ after fix ("ch" "vmin"+"vmax"+"vw"+"vh" not implemented yet)
481
+ // TODO: DEVSIX-4140, DEVSIX- 3596 update cmp_ after fix ("ch" "vmin"+"vmax"+"vw"+"vh" not implemented yet)
335
482
ConvertAndCompare ( sourceFolder , destinationFolder , "userSpaceOnUseDiffRelativeUnitsInGradient" ) ;
336
483
}
337
484
@@ -385,6 +532,7 @@ public virtual void TranslateTransformInGradientWithObjectBoundingBoxUnitsTest()
385
532
386
533
[ NUnit . Framework . Test ]
387
534
public virtual void MatrixTransformInGradientWithObjectBoundingBoxUnitsTest ( ) {
535
+ //TODO change cmp after DEVSIX-4143 is fixed (bug with only one absolute coordinate in tspan)
388
536
ConvertAndCompare ( sourceFolder , destinationFolder , "matrixTransformInGradientWithObjectBoundingBoxUnits" ) ;
389
537
}
390
538
0 commit comments