vcl/qa/cppunit/svm/svmtest.cxx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
New commits: commit ede8a34679ca35ec8e2dfa433b16ce83e068eb0d Author: Tomaž Vajngerl <[email protected]> AuthorDate: Fri Sep 13 16:24:57 2019 +0200 Commit: Tomaž Vajngerl <[email protected]> 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 <[email protected]> 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")); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
