Skip to content

Commit 07fc122

Browse files
Benoit LagaeiText-CI
authored andcommitted
Only do postdraw for non-grouping elements
DEVSIX-2067 Autoported commit. Original commit hash: [fe7d6063d]
1 parent 0514ed0 commit 07fc122

File tree

242 files changed

+23
-20
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+23
-20
lines changed

itext.tests/itext.svg.tests/itext/svg/renderers/impl/ClipPathSvgNodeRendererLowLevelIntegrationTest.cs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public virtual void TestRectClipPathRenderer() {
5555
rectRenderer.SetAttribute(SvgConstants.Attributes.HEIGHT, "400");
5656
clipRenderer.AddChild(rectRenderer);
5757
clipRenderer.Draw(sdc);
58-
NUnit.Framework.Assert.AreEqual("q\n% rect\n0 0 300 300 re\nh\nW\nn\nQ\n", iText.IO.Util.JavaUtil.GetStringForBytes
58+
NUnit.Framework.Assert.AreEqual("q\n% rect\n0 0 300 300 re\nW\nn\nQ\n", iText.IO.Util.JavaUtil.GetStringForBytes
5959
(cv.GetContentStream().GetBytes()));
6060
}
6161

@@ -69,7 +69,7 @@ public virtual void TestRectClipPathEoRendererNoChange() {
6969
rectRenderer.SetAttribute(SvgConstants.Attributes.HEIGHT, "400");
7070
clipRenderer.AddChild(rectRenderer);
7171
clipRenderer.Draw(sdc);
72-
NUnit.Framework.Assert.AreEqual("q\n% rect\n0 0 300 300 re\nh\nW\nn\nQ\n", iText.IO.Util.JavaUtil.GetStringForBytes
72+
NUnit.Framework.Assert.AreEqual("q\n% rect\n0 0 300 300 re\nW\nn\nQ\n", iText.IO.Util.JavaUtil.GetStringForBytes
7373
(cv.GetContentStream().GetBytes()));
7474
}
7575

@@ -83,7 +83,7 @@ public virtual void TestRectEoClipPathRenderer() {
8383
rectRenderer.SetAttribute(SvgConstants.Attributes.CLIP_RULE, SvgConstants.Values.FILL_RULE_EVEN_ODD);
8484
clipRenderer.AddChild(rectRenderer);
8585
clipRenderer.Draw(sdc);
86-
NUnit.Framework.Assert.AreEqual("q\n% rect\n0 0 300 300 re\nh\nW*\nn\nQ\n", iText.IO.Util.JavaUtil.GetStringForBytes
86+
NUnit.Framework.Assert.AreEqual("q\n% rect\n0 0 300 300 re\nW*\nn\nQ\n", iText.IO.Util.JavaUtil.GetStringForBytes
8787
(cv.GetContentStream().GetBytes()));
8888
}
8989

@@ -100,9 +100,9 @@ public virtual void TestAppliedClipPathRenderer() {
100100
drawnRenderer.SetAttribute(SvgConstants.Attributes.R, "84");
101101
drawnRenderer.SetAttribute(SvgConstants.Attributes.CLIP_PATH, "url(#randomString)");
102102
drawnRenderer.Draw(sdc);
103-
String expected = "q\n" + "% rect\n" + "0 0 60 60 re\n" + "h\n" + "W\n" + "n\n" + "0 0 0 rg\n" + "% ellipse\n"
104-
+ "63 0 m\n" + "63 34.79 34.79 63 0 63 c\n" + "-34.79 63 -63 34.79 -63 0 c\n" + "-63 -34.79 -34.79 -63 0 -63 c\n"
105-
+ "34.79 -63 63 -34.79 63 0 c\n" + "f\n" + "h\n" + "Q\n";
103+
String expected = "q\n" + "% rect\n" + "0 0 60 60 re\n" + "W\n" + "n\n" + "0 0 0 rg\n" + "% ellipse\n" + "63 0 m\n"
104+
+ "63 34.79 34.79 63 0 63 c\n" + "-34.79 63 -63 34.79 -63 0 c\n" + "-63 -34.79 -34.79 -63 0 -63 c\n"
105+
+ "34.79 -63 63 -34.79 63 0 c\n" + "f\n" + "h\n" + "Q\n";
106106
NUnit.Framework.Assert.AreEqual(expected, iText.IO.Util.JavaUtil.GetStringForBytes(cv.GetContentStream().GetBytes
107107
()));
108108
}
@@ -123,9 +123,9 @@ public virtual void TestAppliedGroupClipPathRenderer() {
123123
drawnRenderer.SetAttribute(SvgConstants.Attributes.CLIP_PATH, "url(#randomString)");
124124
groupRenderer.AddChild(drawnRenderer);
125125
groupRenderer.Draw(sdc);
126-
String expected = "0 0 0 rg\n" + "q\n" + "q\n" + "% rect\n" + "0 0 60 60 re\n" + "h\n" + "W\n" + "n\n" + "% ellipse\n"
126+
String expected = "0 0 0 rg\n" + "q\n" + "q\n" + "% rect\n" + "0 0 60 60 re\n" + "W\n" + "n\n" + "% ellipse\n"
127127
+ "63 0 m\n" + "63 34.79 34.79 63 0 63 c\n" + "-34.79 63 -63 34.79 -63 0 c\n" + "-63 -34.79 -34.79 -63 0 -63 c\n"
128-
+ "34.79 -63 63 -34.79 63 0 c\n" + "f\n" + "h\n" + "Q\n" + "Q\n" + "f\n" + "h\n";
128+
+ "34.79 -63 63 -34.79 63 0 c\n" + "f\n" + "h\n" + "Q\n" + "Q\n";
129129
NUnit.Framework.Assert.AreEqual(expected, iText.IO.Util.JavaUtil.GetStringForBytes(cv.GetContentStream().GetBytes
130130
()));
131131
}
@@ -151,12 +151,11 @@ public virtual void TestEoAppliedGroupClipPathRenderer() {
151151
drawnRenderer.SetAttribute(SvgConstants.Attributes.CLIP_PATH, "url(#randomString)");
152152
groupRenderer.AddChild(drawnRenderer);
153153
groupRenderer.Draw(sdc);
154-
String expected = "0 0 0 rg\n" + "q\n" + "q\n" + "% rect\n" + "0 0 60 60 re\n" + "h\n" + "W*\n" + "n\n" +
155-
"% ellipse\n" + "63 0 m\n" + "63 34.79 34.79 63 0 63 c\n" + "-34.79 63 -63 34.79 -63 0 c\n" + "-63 -34.79 -34.79 -63 0 -63 c\n"
156-
+ "34.79 -63 63 -34.79 63 0 c\n" + "f\n" + "h\n" + "Q\n" + "q\n" + "% rect\n" + "0 0 60 60 re\n" + "h\n"
157-
+ "W\n" + "n\n" + "% ellipse\n" + "63 0 m\n" + "63 34.79 34.79 63 0 63 c\n" + "-34.79 63 -63 34.79 -63 0 c\n"
158-
+ "-63 -34.79 -34.79 -63 0 -63 c\n" + "34.79 -63 63 -34.79 63 0 c\n" + "f\n" + "h\n" + "Q\n" + "Q\n"
159-
+ "f\n" + "h\n";
154+
String expected = "0 0 0 rg\n" + "q\n" + "q\n" + "% rect\n" + "0 0 60 60 re\n" + "W*\n" + "n\n" + "% ellipse\n"
155+
+ "63 0 m\n" + "63 34.79 34.79 63 0 63 c\n" + "-34.79 63 -63 34.79 -63 0 c\n" + "-63 -34.79 -34.79 -63 0 -63 c\n"
156+
+ "34.79 -63 63 -34.79 63 0 c\n" + "f\n" + "h\n" + "Q\n" + "q\n" + "% rect\n" + "0 0 60 60 re\n" + "W\n"
157+
+ "n\n" + "% ellipse\n" + "63 0 m\n" + "63 34.79 34.79 63 0 63 c\n" + "-34.79 63 -63 34.79 -63 0 c\n"
158+
+ "-63 -34.79 -34.79 -63 0 -63 c\n" + "34.79 -63 63 -34.79 63 0 c\n" + "f\n" + "h\n" + "Q\n" + "Q\n";
160159
NUnit.Framework.Assert.AreEqual(expected, iText.IO.Util.JavaUtil.GetStringForBytes(cv.GetContentStream().GetBytes
161160
()));
162161
}

0 commit comments

Comments
 (0)