diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-09-13 16:24:57 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-09-16 11:14:37 +0200 |
commit | ede8a34679ca35ec8e2dfa433b16ce83e068eb0d (patch) | |
tree | b9bde2f73a6d66970ba43def8ad41eacc5d08f15 /vcl/qa/cppunit/svm | |
parent | 78d225f51404d1a98795541bc9c84f7405502411 (diff) |
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@gmail.com>
Diffstat (limited to 'vcl/qa/cppunit/svm')
-rw-r--r-- | vcl/qa/cppunit/svm/svmtest.cxx | 34 |
1 files changed, 34 insertions, 0 deletions
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")); } |