From 21ec9beae29b19b8ec6f0a16fd0e708e4f210208 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Tue, 31 Jan 2012 01:04:10 +0100 Subject: 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 --- canvas/source/cairo/cairo_canvashelper.hxx | 1 + canvas/source/directx/dx_bitmapcanvashelper.hxx | 1 + canvas/source/directx/dx_canvashelper.hxx | 2 ++ canvas/source/tools/canvastools.cxx | 10 +++++----- canvas/source/vcl/canvashelper.hxx | 1 + 5 files changed, 10 insertions(+), 5 deletions(-) (limited to 'canvas') 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 +#include #include #include 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 +#include #include #include 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 +#include +#include #include #include 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; iRed); *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 +#include #include #include -- cgit