diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-24 09:43:46 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-24 09:43:46 +0000 |
commit | 8a34c69d3b7b12e5063c190b771459f0151ff87e (patch) | |
tree | 13157327b74da2f9ff4016920dbb42ac450f2bce /canvas | |
parent | 430f62cd5d2627b1a930e63f99200c3bd9ecfcaf (diff) |
INTEGRATION: CWS canvas05 (1.4.68); FILE MERGED
2008/04/21 07:27:28 thb 1.4.68.3: RESYNC: (1.4-1.5); FILE MERGED
2007/12/20 22:18:58 thb 1.4.68.2: #i81092# #i78888# #i78925# #i79258# #i79437# #i84784# Large canvas rework, completing various areas such as color spaces, bitmap data access, true sprite and non-sprite implementations, and upstreaming the canvas parts of rodos emf+ rendering
2007/10/01 13:02:02 thb 1.4.68.1: #i78888# #i78925# #i79258# #i79437# Merge from CWS picom
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/null/null_devicehelper.cxx | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/canvas/source/null/null_devicehelper.cxx b/canvas/source/null/null_devicehelper.cxx index b7c3ceec6fcc..0085e3dbdb95 100644 --- a/canvas/source/null/null_devicehelper.cxx +++ b/canvas/source/null/null_devicehelper.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: null_devicehelper.cxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.6 $ * * This file is part of OpenOffice.org. * @@ -34,14 +34,16 @@ #include <canvas/debug.hxx> #include <canvas/verbosetrace.hxx> #include <canvas/canvastools.hxx> -#include <canvas/base/linepolypolygonbase.hxx> #include <osl/mutex.hxx> +#include <rtl/instance.hxx> #include <cppuhelper/compbase1.hxx> #include <com/sun/star/lang/NoSupportException.hpp> #include <basegfx/tools/canvastools.hxx> +#include <basegfx/tools/unopolypolygon.hxx> +#include <vcl/canvastools.hxx> #include "null_spritecanvas.hxx" #include "null_canvasbitmap.hxx" @@ -93,8 +95,8 @@ namespace nullcanvas return uno::Reference< rendering::XLinePolyPolygon2D >(); // we're disposed return uno::Reference< rendering::XLinePolyPolygon2D >( - new ::canvas::LinePolyPolygonBase( - ::basegfx::unotools::polyPolygonFromPoint2DSequenceSequence( points ) ) ); + new ::basegfx::unotools::UnoPolyPolygon( + ::basegfx::unotools::polyPolygonFromPoint2DSequenceSequence( points ))); } uno::Reference< rendering::XBezierPolyPolygon2D > DeviceHelper::createCompatibleBezierPolyPolygon( @@ -106,7 +108,7 @@ namespace nullcanvas return uno::Reference< rendering::XBezierPolyPolygon2D >(); // we're disposed return uno::Reference< rendering::XBezierPolyPolygon2D >( - new ::canvas::LinePolyPolygonBase( + new ::basegfx::unotools::UnoPolyPolygon( ::basegfx::unotools::polyPolygonFromBezier2DSequenceSequence( points ) ) ); } @@ -179,19 +181,24 @@ namespace nullcanvas // _always_ will have exactly one backbuffer } - ::sal_Bool DeviceHelper::showBuffer( ::sal_Bool bUpdateAll ) + ::sal_Bool DeviceHelper::showBuffer( bool bIsVisible, ::sal_Bool bUpdateAll ) { // forward to sprite canvas helper - if( !mpSpriteCanvas ) + if( !bIsVisible || !mpSpriteCanvas ) return false; return mpSpriteCanvas->updateScreen( bUpdateAll ); } - ::sal_Bool DeviceHelper::switchBuffer( ::sal_Bool bUpdateAll ) + ::sal_Bool DeviceHelper::switchBuffer( bool bIsVisible, ::sal_Bool bUpdateAll ) { // no difference for VCL canvas - return showBuffer( bUpdateAll ); + return showBuffer( bIsVisible, bUpdateAll ); + } + + uno::Any DeviceHelper::isAccelerated() const + { + return ::com::sun::star::uno::makeAny(false); } uno::Any DeviceHelper::getDeviceHandle() const @@ -204,6 +211,24 @@ namespace nullcanvas return uno::Any(); } + namespace + { + struct DeviceColorSpace: public rtl::StaticWithInit<uno::Reference<rendering::XColorSpace>, + DeviceColorSpace> + { + uno::Reference<rendering::XColorSpace> operator()() + { + return vcl::unotools::createStandardColorSpace(); + } + }; + } + + uno::Reference<rendering::XColorSpace> DeviceHelper::getColorSpace() const + { + // always the same + return DeviceColorSpace::get(); + } + void DeviceHelper::notifySizeUpdate( const awt::Rectangle& /*rBounds*/ ) { // TODO |