[Libreoffice-commits] core.git: vcl/qa
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 16 09:15:17 UTC 2019
vcl/qa/cppunit/svm/svmtest.cxx | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
New commits:
commit ede8a34679ca35ec8e2dfa433b16ce83e068eb0d
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri Sep 13 16:24:57 2019 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Sep 16 11:14:37 2019 +0200
vcl: update the svm test for gradient with additional example
Change-Id: If4202cb7b13bc1af81303cc682af5f30d414c5b5
Reviewed-on: https://gerrit.libreoffice.org/78875
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index 00541e7f2b8f..3e9a40314c10 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -1179,6 +1179,25 @@ void SvmTest::checkGradient(const GDIMetaFile& rMetaFile)
{"right", "4"},
{"bottom", "6"},
});
+
+ assertXPathAttrs(pDoc, "/metafile/gradient[2]", {
+ {"style", "Radial"},
+ {"startcolor", "#ff0000"},
+ {"endcolor", "#00ff00"},
+ {"angle", "55"},
+ {"border", "10"},
+ {"offsetx", "22"},
+ {"offsety", "24"},
+ {"startintensity", "4"},
+ {"endintensity", "14"},
+ {"steps", "64"},
+ });
+ assertXPathAttrs(pDoc, "/metafile/gradient[2]/rectangle", {
+ {"left", "3"},
+ {"top", "4"},
+ {"right", "3"},
+ {"bottom", "5"},
+ });
}
void SvmTest::testGradient()
@@ -1192,6 +1211,21 @@ void SvmTest::testGradient()
Gradient aGradient(GradientStyle::Linear, COL_WHITE, COL_BLACK);
pVirtualDev->DrawGradient(aRectangle, aGradient);
+ tools::Rectangle aRectangle2(Point(3, 4), Size(1,2));
+
+ Gradient aGradient2;
+ aGradient2.SetStyle(GradientStyle::Radial);
+ aGradient2.SetStartColor(COL_LIGHTRED);
+ aGradient2.SetEndColor(COL_LIGHTGREEN);
+ aGradient2.SetAngle(55);
+ aGradient2.SetBorder(10);
+ aGradient2.SetOfsX(22);
+ aGradient2.SetOfsY(24);
+ aGradient2.SetStartIntensity(4);
+ aGradient2.SetEndIntensity(14);
+ aGradient2.SetSteps(64);
+ pVirtualDev->DrawGradient(aRectangle2, aGradient2);
+
checkGradient(writeAndRead(aGDIMetaFile, "gradient.svm"));
}
More information about the Libreoffice-commits
mailing list