summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2013-10-09 20:02:19 +0200
committerThorsten Behrens <thb@documentfoundation.org>2013-10-09 20:09:20 +0200
commit528391f3c98e3ea809134ba2b9c60bb62e929c47 (patch)
tree27d137943c3e74f3fc1823d5cb5ce4f0a23ea4db /vcl/source
parent7727b9e88d0498dfb800354debaf889c8cf63bd7 (diff)
Resuscitate old vcl unit tests.
Needs a deleted canvastools method, move code into more idiomatic vcl/qa place, adapt to new unit test framework. Change-Id: Iddb9c2249673b4d580e46a1d72029be0a8c4d9ba
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/helper/canvastools.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index ab5d7770deb2..6900f70dc93a 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -575,6 +575,21 @@ namespace vcl
}
+ uno::Sequence< double > colorToStdColorSpaceSequence( const Color& rColor )
+ {
+ uno::Sequence< double > aRet(4);
+ double* pRet = aRet.getArray();
+
+ pRet[0] = toDoubleColor(rColor.GetRed());
+ pRet[1] = toDoubleColor(rColor.GetGreen());
+ pRet[2] = toDoubleColor(rColor.GetBlue());
+
+ // VCL's notion of alpha is different from the rest of the world's
+ pRet[3] = 1.0 - toDoubleColor(rColor.GetTransparency());
+
+ return aRet;
+ }
+
Color stdColorSpaceSequenceToColor( const uno::Sequence< double >& rColor )
{
ENSURE_ARG_OR_THROW( rColor.getLength() == 4,