summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/transparent.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-05-03 16:14:21 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2014-05-03 20:53:43 +1000
commitbe8a6756179beeb9dedcab5fbb105ab92808a4f8 (patch)
treec6ec76626fe94fe7859ad3fd16a8b010a8576529 /vcl/source/outdev/transparent.cxx
parente81212315b5fe22e1005d41149a0ea1a557bf412 (diff)
Rearrange outdev.cxx functions, et al.
* Rearranged outdev.cxx functions to better match outdev.hxx layout * Moved transparency functions from outdev.cxx to transparency.cxx * Corrected one comment typo in outdev.hxx * Moved CreateUnoGraphicsList definition to outdev.cxx out of header * Formatted function declarations in outdev.hxx Change-Id: I6fda24ae8208ef5ea7b2fe8f59079d48d0af1488
Diffstat (limited to 'vcl/source/outdev/transparent.cxx')
-rw-r--r--vcl/source/outdev/transparent.cxx52
1 files changed, 52 insertions, 0 deletions
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 21d7bb466370..2b94fb6dc5e3 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -20,10 +20,13 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <boost/scoped_array.hpp>
+
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
#include <vcl/bmpacc.hxx>
+#include <vcl/settings.hxx>
+#include "outdata.hxx"
#include "salgdi.hxx"
namespace
@@ -64,7 +67,56 @@ namespace
return aTarget;
}
+}
+
+Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) const
+{
+ Color aColor( rColor );
+ sal_uLong nDrawMode = GetDrawMode();
+ if( nDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
+ DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE |
+ DRAWMODE_SETTINGSLINE ) )
+ {
+ if( !ImplIsColorTransparent( aColor ) )
+ {
+ if( nDrawMode & DRAWMODE_BLACKLINE )
+ {
+ aColor = Color( COL_BLACK );
+ }
+ else if( nDrawMode & DRAWMODE_WHITELINE )
+ {
+ aColor = Color( COL_WHITE );
+ }
+ else if( nDrawMode & DRAWMODE_GRAYLINE )
+ {
+ const sal_uInt8 cLum = aColor.GetLuminance();
+ aColor = Color( cLum, cLum, cLum );
+ }
+ else if( nDrawMode & DRAWMODE_SETTINGSLINE )
+ {
+ aColor = GetSettings().GetStyleSettings().GetFontColor();
+ }
+
+ if( nDrawMode & DRAWMODE_GHOSTEDLINE )
+ {
+ aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
+ ( aColor.GetGreen() >> 1 ) | 0x80,
+ ( aColor.GetBlue() >> 1 ) | 0x80);
+ }
+ }
+ }
+ return aColor;
+}
+
+sal_uInt16 OutputDevice::GetAlphaBitCount() const
+{
+ return 0;
+}
+
+bool OutputDevice::HasAlpha()
+{
+ return mpAlphaVDev != NULL;
}
void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask,