forked from pipeline-foundation/itext7-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into devsecops
- Loading branch information
Showing
70 changed files
with
935 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
itext.tests/itext.svg.tests/itext/svg/renderers/VectorEffectTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/* | ||
This file is part of the iText (R) project. | ||
Copyright (c) 1998-2025 Apryse Group NV | ||
Authors: Apryse Software. | ||
This program is offered under a commercial and under the AGPL license. | ||
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below. | ||
AGPL licensing: | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
using System; | ||
using iText.Svg.Logs; | ||
using iText.Test; | ||
using iText.Test.Attributes; | ||
|
||
namespace iText.Svg.Renderers { | ||
[NUnit.Framework.Category("IntegrationTest")] | ||
public class VectorEffectTest : SvgIntegrationTest { | ||
private static readonly String SOURCE_FOLDER = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext | ||
.CurrentContext.TestDirectory) + "/resources/itext/svg/renderers/VectorEffectTest/"; | ||
|
||
private static readonly String DESTINATION_FOLDER = NUnit.Framework.TestContext.CurrentContext.TestDirectory | ||
+ "/test/itext/svg/renderers/VectorEffectTest/"; | ||
|
||
[NUnit.Framework.OneTimeSetUp] | ||
public static void BeforeClass() { | ||
ITextTest.CreateDestinationFolder(DESTINATION_FOLDER); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void NonScalingStrokeTest() { | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nonScalingStroke"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void NonScalingStrokePathTest() { | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nonScalingStrokePath"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void NonScalingStrokeFiguresTest() { | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nonScalingStrokeFigures"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void NonScalingStrokeTextTest() { | ||
// TODO DEVSIX-8850 support vector-effect for text and tspan | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nonScalingStrokeText"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void PreserveAspectRatioTest() { | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "preserveAspectRatio"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void SvgWithSvgTest() { | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "svgWithSvg"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void SeveralTransformationsTest() { | ||
// TODO DEVSIX-8850 support vector-effect for text and tspan | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "severalTransformations"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void SeveralNestedSvgTest() { | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "severalNestedSvg"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
[LogMessage(iText.StyledXmlParser.Logs.StyledXmlParserLogMessageConstant.UNABLE_TO_RETRIEVE_IMAGE_WITH_GIVEN_BASE_URI | ||
)] | ||
public virtual void ImageWithSvgTest() { | ||
// TODO DEVSIX-8884 Support svg format for image href attribute | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "imageWithSvg"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void ClipPathTest() { | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "clipPath"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
public virtual void VectorEffectOnUseTest() { | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "vectorEffectOnUse"); | ||
} | ||
|
||
[NUnit.Framework.Test] | ||
[LogMessage(SvgLogMessageConstant.NON_INVERTIBLE_TRANSFORMATION_MATRIX_FOR_NON_SCALING_STROKE)] | ||
public virtual void NonInvertibleMatrixTest() { | ||
ConvertAndCompare(SOURCE_FOLDER, DESTINATION_FOLDER, "nonInvertibleMatrix"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+27 Bytes
(100%)
...text.svg.tests/resources/itext/svg/JFreeSvgTest/cmp_usingJFreeSvgBarChartFromFileTest.pdf
Binary file not shown.
Binary file modified
BIN
+27 Bytes
(100%)
...xt.svg.tests/resources/itext/svg/JFreeSvgTest/cmp_usingJFreeSvgBarChartFromStringTest.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...text.svg.tests/resources/itext/svg/JFreeSvgTest/cmp_usingJFreeSvgPieChartFromFileTest.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
itext.tests/itext.svg.tests/resources/itext/svg/css/SvgStyleResolver/cmp_chartWithText1.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
.../resources/itext/svg/googlecharts/IntervalsChartsTest/cmp_intervalsBackgroundBoxChart.pdf
Binary file not shown.
Binary file modified
BIN
-1 Byte
(100%)
...vg.tests/resources/itext/svg/googlecharts/SteppedAreaChartsTest/cmp_steppedArea2Chart.pdf
Binary file not shown.
Binary file modified
BIN
-1 Byte
(100%)
...svg.tests/resources/itext/svg/googlecharts/SteppedAreaChartsTest/cmp_steppedAreaChart.pdf
Binary file not shown.
53 changes: 53 additions & 0 deletions
53
...sts/itext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/clipPath.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.99 KB
itext.tests/itext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_clipPath.pdf
Binary file not shown.
Binary file added
BIN
+1.3 KB
...tests/itext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_imageWithSvg.pdf
Binary file not shown.
Binary file added
BIN
+1.73 KB
...text.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_nonInvertibleMatrix.pdf
Binary file not shown.
Binary file added
BIN
+1.92 KB
...s/itext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_nonScalingStroke.pdf
Binary file not shown.
Binary file added
BIN
+7.85 KB
....svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_nonScalingStrokeFigures.pdf
Binary file not shown.
Binary file added
BIN
+2.64 KB
...ext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_nonScalingStrokePath.pdf
Binary file not shown.
Binary file added
BIN
+2.62 KB
...ext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_nonScalingStrokeText.pdf
Binary file not shown.
Binary file added
BIN
+8.23 KB
...text.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_preserveAspectRatio.pdf
Binary file not shown.
Binary file added
BIN
+4.5 KB
...s/itext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_severalNestedSvg.pdf
Binary file not shown.
Binary file added
BIN
+4.98 KB
...t.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_severalTransformations.pdf
Binary file not shown.
Binary file added
BIN
+4.68 KB
...t.tests/itext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_svgWithSvg.pdf
Binary file not shown.
Binary file added
BIN
+3.76 KB
.../itext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/cmp_vectorEffectOnUse.pdf
Binary file not shown.
Binary file added
BIN
+3.13 KB
....tests/itext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions
4
...itext.svg.tests/resources/itext/svg/renderers/VectorEffectTest/imageWithSvg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions
15
...vg.tests/resources/itext/svg/renderers/VectorEffectTest/nonInvertibleMatrix.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions
11
...t.svg.tests/resources/itext/svg/renderers/VectorEffectTest/nonScalingStroke.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions
60
...ests/resources/itext/svg/renderers/VectorEffectTest/nonScalingStrokeFigures.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions
30
...g.tests/resources/itext/svg/renderers/VectorEffectTest/nonScalingStrokePath.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.