summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-01-31 01:04:10 +0100
committerThorsten Behrens <tbehrens@suse.com>2013-10-07 17:33:45 +0200
commit21ec9beae29b19b8ec6f0a16fd0e708e4f210208 (patch)
tree84b5d635ba0c39282665dea33f40348a1ca73178 /canvas
parent3e2dba1accbd018f7dac362a2636bed135f1b5bb (diff)
XCanvas does no longer imply XBitmapCanvas
Remove the implication that XCanvas IS-A XBitmapCanvas, i.e. one can access underlying pixels. That's a preparation for display-list based canvas implementations, and was a rather silly assumption in the first place. Also fixes up all client sites. Change-Id: I7a3d6f68ef46fe94b23cce7759cc0b8b6ca4dae9
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_canvashelper.hxx1
-rw-r--r--canvas/source/directx/dx_bitmapcanvashelper.hxx1
-rw-r--r--canvas/source/directx/dx_canvashelper.hxx2
-rw-r--r--canvas/source/tools/canvastools.cxx10
-rw-r--r--canvas/source/vcl/canvashelper.hxx1
5 files changed, 10 insertions, 5 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.hxx b/canvas/source/cairo/cairo_canvashelper.hxx
index f1d29727d3de..8b83d2c292fa 100644
--- a/canvas/source/cairo/cairo_canvashelper.hxx
+++ b/canvas/source/cairo/cairo_canvashelper.hxx
@@ -21,6 +21,7 @@
#define _CAIROCANVAS_CANVASHELPER_HXX_
#include <com/sun/star/rendering/XCanvas.hpp>
+#include <com/sun/star/rendering/XBitmapCanvas.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
#include <basegfx/vector/b2isize.hxx>
diff --git a/canvas/source/directx/dx_bitmapcanvashelper.hxx b/canvas/source/directx/dx_bitmapcanvashelper.hxx
index cb0016a892ee..670544a0c6ab 100644
--- a/canvas/source/directx/dx_bitmapcanvashelper.hxx
+++ b/canvas/source/directx/dx_bitmapcanvashelper.hxx
@@ -21,6 +21,7 @@
#define _DXCANVAS_BITMAPCANVASHELPER_HXX_
#include <com/sun/star/rendering/XCanvas.hpp>
+#include <com/sun/star/rendering/XBitmapCanvas.hpp>
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/vector/b2dsize.hxx>
diff --git a/canvas/source/directx/dx_canvashelper.hxx b/canvas/source/directx/dx_canvashelper.hxx
index 157d6113c47b..5a6527d2fd29 100644
--- a/canvas/source/directx/dx_canvashelper.hxx
+++ b/canvas/source/directx/dx_canvashelper.hxx
@@ -21,6 +21,8 @@
#define _DXCANVAS_CANVASHELPER_HXX_
#include <com/sun/star/rendering/XCanvas.hpp>
+#include <com/sun/star/rendering/XBitmapCanvas.hpp>
+#include <com/sun/star/rendering/XIntegerBitmap.hpp>
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/vector/b2dsize.hxx>
diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx
index 26775befb3b4..d6b949b511c5 100644
--- a/canvas/source/tools/canvastools.cxx
+++ b/canvas/source/tools/canvastools.cxx
@@ -387,7 +387,7 @@ namespace canvas
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
- *pOut++ = vcl::unotools::toDoubleColor(255-*pIn++);
+ *pOut++ = vcl::unotools::toDoubleColor(*pIn++);
}
return aRes;
}
@@ -452,7 +452,7 @@ namespace canvas
for( sal_Size i=0; i<nLen; i+=4 )
{
*pOut++ = rendering::ARGBColor(
- vcl::unotools::toDoubleColor(255-pIn[3]),
+ vcl::unotools::toDoubleColor(pIn[3]),
vcl::unotools::toDoubleColor(pIn[0]),
vcl::unotools::toDoubleColor(pIn[1]),
vcl::unotools::toDoubleColor(pIn[2]));
@@ -473,7 +473,7 @@ namespace canvas
rendering::ARGBColor* pOut( aRes.getArray() );
for( sal_Size i=0; i<nLen; i+=4 )
{
- const sal_Int8 nAlpha( 255-pIn[3] );
+ const sal_Int8 nAlpha( pIn[3] );
*pOut++ = rendering::ARGBColor(
vcl::unotools::toDoubleColor(nAlpha),
vcl::unotools::toDoubleColor(nAlpha*pIn[0]),
@@ -514,7 +514,7 @@ namespace canvas
*pColors++ = vcl::unotools::toByteColor(pIn->Red);
*pColors++ = vcl::unotools::toByteColor(pIn->Green);
*pColors++ = vcl::unotools::toByteColor(pIn->Blue);
- *pColors++ = 255-vcl::unotools::toByteColor(pIn->Alpha);
+ *pColors++ = vcl::unotools::toByteColor(pIn->Alpha);
++pIn;
}
return aRes;
@@ -532,7 +532,7 @@ namespace canvas
*pColors++ = vcl::unotools::toByteColor(pIn->Red/pIn->Alpha);
*pColors++ = vcl::unotools::toByteColor(pIn->Green/pIn->Alpha);
*pColors++ = vcl::unotools::toByteColor(pIn->Blue/pIn->Alpha);
- *pColors++ = 255-vcl::unotools::toByteColor(pIn->Alpha);
+ *pColors++ = vcl::unotools::toByteColor(pIn->Alpha);
++pIn;
}
return aRes;
diff --git a/canvas/source/vcl/canvashelper.hxx b/canvas/source/vcl/canvashelper.hxx
index f112b79d2041..69af00c13d6c 100644
--- a/canvas/source/vcl/canvashelper.hxx
+++ b/canvas/source/vcl/canvashelper.hxx
@@ -21,6 +21,7 @@
#define _VCLCANVAS_CANVASHELPER_HXX_
#include <com/sun/star/rendering/XCanvas.hpp>
+#include <com/sun/star/rendering/XBitmapCanvas.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
#include <vcl/outdev.hxx>