summaryrefslogtreecommitdiff
path: root/canvas/source/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'canvas/source/vcl')
-rw-r--r--canvas/source/vcl/backbuffer.cxx10
-rw-r--r--canvas/source/vcl/backbuffer.hxx18
-rw-r--r--canvas/source/vcl/bitmapbackbuffer.cxx22
-rw-r--r--canvas/source/vcl/bitmapbackbuffer.hxx24
-rw-r--r--canvas/source/vcl/cachedbitmap.cxx22
-rw-r--r--canvas/source/vcl/cachedbitmap.hxx30
-rw-r--r--canvas/source/vcl/canvas.cxx22
-rw-r--r--canvas/source/vcl/canvas.hxx20
-rw-r--r--canvas/source/vcl/canvasbitmap.cxx14
-rw-r--r--canvas/source/vcl/canvasbitmap.hxx16
-rw-r--r--canvas/source/vcl/canvasbitmaphelper.cxx150
-rw-r--r--canvas/source/vcl/canvasbitmaphelper.hxx34
-rw-r--r--canvas/source/vcl/canvascustomsprite.cxx36
-rw-r--r--canvas/source/vcl/canvascustomsprite.hxx14
-rw-r--r--canvas/source/vcl/canvasfont.cxx24
-rw-r--r--canvas/source/vcl/canvasfont.hxx10
-rw-r--r--canvas/source/vcl/canvashelper.cxx356
-rw-r--r--canvas/source/vcl/canvashelper.hxx320
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx212
-rw-r--r--canvas/source/vcl/devicehelper.cxx66
-rw-r--r--canvas/source/vcl/devicehelper.hxx38
-rw-r--r--canvas/source/vcl/impltools.cxx116
-rw-r--r--canvas/source/vcl/impltools.hxx50
-rw-r--r--canvas/source/vcl/outdevprovider.hxx6
-rw-r--r--canvas/source/vcl/repainttarget.hxx6
-rw-r--r--canvas/source/vcl/services.cxx2
-rw-r--r--canvas/source/vcl/sprite.hxx2
-rw-r--r--canvas/source/vcl/spritecanvas.cxx32
-rw-r--r--canvas/source/vcl/spritecanvas.hxx20
-rw-r--r--canvas/source/vcl/spritecanvashelper.cxx148
-rw-r--r--canvas/source/vcl/spritecanvashelper.hxx68
-rw-r--r--canvas/source/vcl/spritedevicehelper.cxx20
-rw-r--r--canvas/source/vcl/spritedevicehelper.hxx4
-rw-r--r--canvas/source/vcl/spritehelper.cxx88
-rw-r--r--canvas/source/vcl/spritehelper.hxx18
-rw-r--r--canvas/source/vcl/textlayout.cxx14
-rw-r--r--canvas/source/vcl/textlayout.hxx24
-rw-r--r--canvas/source/vcl/windowoutdevholder.cxx2
-rw-r--r--canvas/source/vcl/windowoutdevholder.hxx8
39 files changed, 1043 insertions, 1043 deletions
diff --git a/canvas/source/vcl/backbuffer.cxx b/canvas/source/vcl/backbuffer.cxx
index ea99b371a483..83bd50262103 100644
--- a/canvas/source/vcl/backbuffer.cxx
+++ b/canvas/source/vcl/backbuffer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,7 +35,7 @@
namespace vclcanvas
{
BackBuffer::BackBuffer( const OutputDevice& rRefDevice,
- bool bMonochromeBuffer ) :
+ bool bMonochromeBuffer ) :
maVDev( new VirtualDevice( rRefDevice,
bMonochromeBuffer ) )
{
@@ -47,13 +47,13 @@ namespace vclcanvas
maVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | maVDev->GetAntialiasing() );
#else
// switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
- // is not required to do AA. It would need to be adapted to use it correctly
+ // is not required to do AA. It would need to be adapted to use it correctly
// (especially gradient painting). This will need extra work.
maVDev->SetAntialiasing( maVDev->GetAntialiasing() & !ANTIALIASING_ENABLE_B2DDRAW);
#endif
}
}
-
+
OutputDevice& BackBuffer::getOutDev()
{
return maVDev.get();
@@ -63,7 +63,7 @@ namespace vclcanvas
{
return maVDev.get();
}
-
+
void BackBuffer::setSize( const ::Size& rNewSize )
{
maVDev->SetOutputSizePixel( rNewSize );
diff --git a/canvas/source/vcl/backbuffer.hxx b/canvas/source/vcl/backbuffer.hxx
index a359bcfaa3b8..7834d374f7da 100644
--- a/canvas/source/vcl/backbuffer.hxx
+++ b/canvas/source/vcl/backbuffer.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,16 +50,16 @@ namespace vclcanvas
chosen. When true, the buffer will be monochrome, i.e. one
bit deep.
*/
- BackBuffer( const OutputDevice& rRefDevice,
- bool bMonochromeBuffer=false );
-
- virtual OutputDevice& getOutDev();
- virtual const OutputDevice& getOutDev() const;
-
+ BackBuffer( const OutputDevice& rRefDevice,
+ bool bMonochromeBuffer=false );
+
+ virtual OutputDevice& getOutDev();
+ virtual const OutputDevice& getOutDev() const;
+
void setSize( const ::Size& rNewSize );
-
+
private:
- ::canvas::vcltools::VCLObject<VirtualDevice> maVDev;
+ ::canvas::vcltools::VCLObject<VirtualDevice> maVDev;
};
typedef ::boost::shared_ptr< BackBuffer > BackBufferSharedPtr;
diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx
index 6865a70f1e31..a8023a750a40 100644
--- a/canvas/source/vcl/bitmapbackbuffer.cxx
+++ b/canvas/source/vcl/bitmapbackbuffer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,8 +41,8 @@
namespace vclcanvas
{
- BitmapBackBuffer::BitmapBackBuffer( const BitmapEx& rBitmap,
- const OutputDevice& rRefDevice ) :
+ BitmapBackBuffer::BitmapBackBuffer( const BitmapEx& rBitmap,
+ const OutputDevice& rRefDevice ) :
maBitmap( rBitmap ),
mpVDev( NULL ),
mrRefDevice( rRefDevice ),
@@ -50,13 +50,13 @@ namespace vclcanvas
mbVDevContentIsCurrent( false )
{
}
-
+
BitmapBackBuffer::~BitmapBackBuffer()
{
// make sure solar mutex is held on deletion (other methods
// are supposed to be called with already locked solar mutex)
SolarMutexGuard aGuard;
-
+
if( mpVDev )
delete mpVDev;
}
@@ -78,7 +78,7 @@ namespace vclcanvas
void BitmapBackBuffer::clear()
{
// force current content to bitmap, make all transparent white
- getBitmapReference().Erase(COL_TRANSPARENT);
+ getBitmapReference().Erase(COL_TRANSPARENT);
}
BitmapEx& BitmapBackBuffer::getBitmapReference()
@@ -98,7 +98,7 @@ namespace vclcanvas
// client queries bitmap, and will possibly alter content -
// next time, VDev needs to be updated
mbBitmapContentIsCurrent = true;
- mbVDevContentIsCurrent = false;
+ mbVDevContentIsCurrent = false;
return *maBitmap;
}
@@ -122,11 +122,11 @@ namespace vclcanvas
{
// VDev not yet created, do it now. Create an alpha-VDev,
// if bitmap has transparency.
- mpVDev = maBitmap->IsTransparent() ?
+ mpVDev = maBitmap->IsTransparent() ?
new VirtualDevice( mrRefDevice, 0, 0 ) :
new VirtualDevice( mrRefDevice );
- OSL_ENSURE( mpVDev,
+ OSL_ENSURE( mpVDev,
"BitmapBackBuffer::createVDev(): Unable to create VirtualDevice" );
mpVDev->SetOutputSizePixel( maBitmap->GetSizePixel() );
@@ -137,7 +137,7 @@ namespace vclcanvas
mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | mpVDev->GetAntialiasing() );
#else
// switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
- // is not required to do AA. It would need to be adapted to use it correctly
+ // is not required to do AA. It would need to be adapted to use it correctly
// (especially gradient painting). This will need extra work.
mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & !ANTIALIASING_ENABLE_B2DDRAW);
#endif
@@ -160,7 +160,7 @@ namespace vclcanvas
// canvas queried the VDev, and will possibly paint into
// it. Next time, bitmap must be updated
mbBitmapContentIsCurrent = false;
- mbVDevContentIsCurrent = true;
+ mbVDevContentIsCurrent = true;
}
}
diff --git a/canvas/source/vcl/bitmapbackbuffer.hxx b/canvas/source/vcl/bitmapbackbuffer.hxx
index dcb9038f8ee9..c7023a41d762 100644
--- a/canvas/source/vcl/bitmapbackbuffer.hxx
+++ b/canvas/source/vcl/bitmapbackbuffer.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,12 +51,12 @@ namespace vclcanvas
public:
/** Create a backbuffer for given reference device
*/
- BitmapBackBuffer( const BitmapEx& rBitmap,
- const OutputDevice& rRefDevice );
-
+ BitmapBackBuffer( const BitmapEx& rBitmap,
+ const OutputDevice& rRefDevice );
+
~BitmapBackBuffer();
- virtual OutputDevice& getOutDev();
+ virtual OutputDevice& getOutDev();
virtual const OutputDevice& getOutDev() const;
/// Clear the underlying bitmap to white, all transparent
@@ -67,17 +67,17 @@ namespace vclcanvas
@internal
*/
- BitmapEx& getBitmapReference();
- Size getBitmapSizePixel() const;
+ BitmapEx& getBitmapReference();
+ Size getBitmapSizePixel() const;
private:
void createVDev() const;
void updateVDev() const;
- ::canvas::vcltools::VCLObject<BitmapEx> maBitmap;
- mutable VirtualDevice* mpVDev; // created only on demand
+ ::canvas::vcltools::VCLObject<BitmapEx> maBitmap;
+ mutable VirtualDevice* mpVDev; // created only on demand
- const OutputDevice& mrRefDevice;
+ const OutputDevice& mrRefDevice;
/** When true, the bitmap contains the last valid
content. When false, and mbVDevContentIsCurrent is true,
@@ -86,7 +86,7 @@ namespace vclcanvas
called). When both are false, this object is just
initialized.
*/
- mutable bool mbBitmapContentIsCurrent;
+ mutable bool mbBitmapContentIsCurrent;
/** When true, and mpVDev is non-NULL, the VDev contains the
last valid content. When false, and
@@ -94,7 +94,7 @@ namespace vclcanvas
last valid content. When both are false, this object is
just initialized.
*/
- mutable bool mbVDevContentIsCurrent;
+ mutable bool mbVDevContentIsCurrent;
};
typedef ::boost::shared_ptr< BitmapBackBuffer > BitmapBackBufferSharedPtr;
diff --git a/canvas/source/vcl/cachedbitmap.cxx b/canvas/source/vcl/cachedbitmap.cxx
index 964e02414a5b..39debc51f836 100644
--- a/canvas/source/vcl/cachedbitmap.cxx
+++ b/canvas/source/vcl/cachedbitmap.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,12 +46,12 @@ using namespace ::com::sun::star;
namespace vclcanvas
{
- CachedBitmap::CachedBitmap( const GraphicObjectSharedPtr& rGraphicObject,
- const ::Point& rPoint,
- const ::Size& rSize,
- const GraphicAttr& rAttr,
- const rendering::ViewState& rUsedViewState,
- const rendering::RenderState& rUsedRenderState,
+ CachedBitmap::CachedBitmap( const GraphicObjectSharedPtr& rGraphicObject,
+ const ::Point& rPoint,
+ const ::Size& rSize,
+ const GraphicAttr& rAttr,
+ const rendering::ViewState& rUsedViewState,
+ const rendering::RenderState& rUsedRenderState,
const uno::Reference< rendering::XCanvas >& rTarget ) :
CachedPrimitiveBase( rUsedViewState, rTarget, true ),
mpGraphicObject( rGraphicObject ),
@@ -71,10 +71,10 @@ namespace vclcanvas
CachedPrimitiveBase::disposing();
}
- ::sal_Int8 CachedBitmap::doRedraw( const rendering::ViewState& rNewState,
- const rendering::ViewState& rOldState,
- const uno::Reference< rendering::XCanvas >& rTargetCanvas,
- bool bSameViewTransform )
+ ::sal_Int8 CachedBitmap::doRedraw( const rendering::ViewState& rNewState,
+ const rendering::ViewState& rOldState,
+ const uno::Reference< rendering::XCanvas >& rTargetCanvas,
+ bool bSameViewTransform )
{
ENSURE_OR_THROW( bSameViewTransform,
"CachedBitmap::doRedraw(): base called with changed view transform "
diff --git a/canvas/source/vcl/cachedbitmap.hxx b/canvas/source/vcl/cachedbitmap.hxx
index 9b4ea2b3af7e..5959371a8294 100644
--- a/canvas/source/vcl/cachedbitmap.hxx
+++ b/canvas/source/vcl/cachedbitmap.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,31 +48,31 @@ namespace vclcanvas
/** Create an XCachedPrimitive for given GraphicObject
*/
- CachedBitmap( const GraphicObjectSharedPtr& rGraphicObject,
- const ::Point& rPoint,
+ CachedBitmap( const GraphicObjectSharedPtr& rGraphicObject,
+ const ::Point& rPoint,
const ::Size& rSize,
const GraphicAttr& rAttr,
- const ::com::sun::star::rendering::ViewState& rUsedViewState,
+ const ::com::sun::star::rendering::ViewState& rUsedViewState,
const ::com::sun::star::rendering::RenderState& rUsedRenderState,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XCanvas >& rTarget );
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XCanvas >& rTarget );
/// Dispose all internal references
virtual void SAL_CALL disposing();
private:
- virtual ::sal_Int8 doRedraw( const ::com::sun::star::rendering::ViewState& rNewState,
- const ::com::sun::star::rendering::ViewState& rOldState,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XCanvas >& rTargetCanvas,
- bool bSameViewTransform );
+ virtual ::sal_Int8 doRedraw( const ::com::sun::star::rendering::ViewState& rNewState,
+ const ::com::sun::star::rendering::ViewState& rOldState,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XCanvas >& rTargetCanvas,
+ bool bSameViewTransform );
- GraphicObjectSharedPtr mpGraphicObject;
+ GraphicObjectSharedPtr mpGraphicObject;
const ::com::sun::star::rendering::RenderState maRenderState;
- const ::Point maPoint;
- const ::Size maSize;
- const GraphicAttr maAttributes;
+ const ::Point maPoint;
+ const ::Size maSize;
+ const GraphicAttr maAttributes;
};
}
diff --git a/canvas/source/vcl/canvas.cxx b/canvas/source/vcl/canvas.cxx
index 81ce996015c2..87c4d6de2b81 100644
--- a/canvas/source/vcl/canvas.cxx
+++ b/canvas/source/vcl/canvas.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,7 +58,7 @@ namespace vclcanvas
{
namespace
{
- class OutDevHolder : public OutDevProvider,
+ class OutDevHolder : public OutDevProvider,
private ::boost::noncopyable
{
public:
@@ -67,13 +67,13 @@ namespace vclcanvas
{}
private:
- virtual OutputDevice& getOutDev() { return mrOutDev; }
+ virtual OutputDevice& getOutDev() { return mrOutDev; }
virtual const OutputDevice& getOutDev() const { return mrOutDev; }
// TODO(Q2): Lifetime issue. This _only_ works reliably,
// if disposing the Canvas correctly disposes all
// entities which hold this pointer.
- OutputDevice& mrOutDev;
+ OutputDevice& mrOutDev;
};
}
@@ -103,7 +103,7 @@ namespace vclcanvas
VERBOSE_TRACE( "VCLCanvas::initialize called" );
ENSURE_ARG_OR_THROW( maArguments.getLength() >= 6 &&
- maArguments[0].getValueTypeClass() == uno::TypeClass_HYPER,
+ maArguments[0].getValueTypeClass() == uno::TypeClass_HYPER,
"Canvas::initialize: wrong number of arguments, or wrong types" );
sal_Int64 nPtr = 0;
@@ -115,7 +115,7 @@ namespace vclcanvas
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"Passed OutDev invalid!")),
NULL);
-
+
OutDevProviderSharedPtr pOutdevProvider( new OutDevHolder(*pOutDev) );
// setup helper
@@ -148,17 +148,17 @@ namespace vclcanvas
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CANVAS_SERVICE_NAME ) );
}
- bool Canvas::repaint( const GraphicObjectSharedPtr& rGrf,
+ bool Canvas::repaint( const GraphicObjectSharedPtr& rGrf,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState,
- const ::Point& rPt,
- const ::Size& rSz,
- const GraphicAttr& rAttr ) const
+ const ::Point& rPt,
+ const ::Size& rSz,
+ const GraphicAttr& rAttr ) const
{
SolarMutexGuard aGuard;
return maCanvasHelper.repaint( rGrf, viewState, renderState, rPt, rSz, rAttr );
- }
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/canvas.hxx b/canvas/source/vcl/canvas.hxx
index 555340970a8f..ea6b79a88073 100644
--- a/canvas/source/vcl/canvas.hxx
+++ b/canvas/source/vcl/canvas.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,15 +63,15 @@ namespace vclcanvas
::com::sun::star::lang::XMultiServiceFactory,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
- ::com::sun::star::lang::XServiceName > GraphicDeviceBase_Base;
+ ::com::sun::star::lang::XServiceName > GraphicDeviceBase_Base;
typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
- DeviceHelper,
+ DeviceHelper,
tools::LocalGuard,
- ::cppu::OWeakObject > CanvasBase_Base;
+ ::cppu::OWeakObject > CanvasBase_Base;
typedef ::canvas::IntegerBitmapBase< CanvasBase_Base,
- CanvasHelper,
+ CanvasHelper,
tools::LocalGuard,
- ::cppu::OWeakObject > CanvasBaseT;
+ ::cppu::OWeakObject > CanvasBaseT;
/** Product of this component's factory.
@@ -86,9 +86,9 @@ namespace vclcanvas
public RepaintTarget
{
public:
- Canvas( const ::com::sun::star::uno::Sequence<
+ Canvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
void initialize();
@@ -108,7 +108,7 @@ namespace vclcanvas
// Classname Base doing refcounting Base implementing the XComponent interface
// | | |
// V V V
- DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( Canvas, GraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase );
+ DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( Canvas, GraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase );
// XServiceName
virtual ::rtl::OUString SAL_CALL getServiceName( ) throw (::com::sun::star::uno::RuntimeException);
@@ -117,7 +117,7 @@ namespace vclcanvas
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const com::sun::star::rendering::ViewState& viewState,
const com::sun::star::rendering::RenderState& renderState,
- const ::Point& rPt,
+ const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const;
diff --git a/canvas/source/vcl/canvasbitmap.cxx b/canvas/source/vcl/canvasbitmap.cxx
index 300617f417eb..fbf97f960475 100644
--- a/canvas/source/vcl/canvasbitmap.cxx
+++ b/canvas/source/vcl/canvasbitmap.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,11 +47,11 @@ namespace vclcanvas
bool bAlphaBitmap,
rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDevProvider )
- {
+ {
// create bitmap for given reference device
// ========================================
const USHORT nBitCount( (USHORT)24U );
- const BitmapPalette* pPalette = NULL;
+ const BitmapPalette* pPalette = NULL;
Bitmap aBitmap( rSize, nBitCount, pPalette );
@@ -61,8 +61,8 @@ namespace vclcanvas
// use alpha VDev, then).
if( bAlphaBitmap )
{
- AlphaMask aAlpha ( rSize );
-
+ AlphaMask aAlpha ( rSize );
+
maCanvasHelper.init( BitmapEx( aBitmap, aAlpha ),
rDevice,
rOutDevProvider );
@@ -105,7 +105,7 @@ namespace vclcanvas
{
uno::Sequence< ::rtl::OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
-
+
return aRet;
}
@@ -121,7 +121,7 @@ namespace vclcanvas
bool CanvasBitmap::repaint( const GraphicObjectSharedPtr& rGrf,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState,
- const ::Point& rPt,
+ const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const
{
diff --git a/canvas/source/vcl/canvasbitmap.hxx b/canvas/source/vcl/canvasbitmap.hxx
index a8b20725c629..a1162001d9d1 100644
--- a/canvas/source/vcl/canvasbitmap.hxx
+++ b/canvas/source/vcl/canvasbitmap.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,11 +56,11 @@ namespace vclcanvas
typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
::com::sun::star::lang::XServiceInfo,
- ::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
- typedef ::canvas::IntegerBitmapBase< ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
- CanvasBitmapHelper,
+ ::com::sun::star::beans::XFastPropertySet > CanvasBitmapBase_Base;
+ typedef ::canvas::IntegerBitmapBase< ::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
+ CanvasBitmapHelper,
tools::LocalGuard,
- ::cppu::OWeakObject > CanvasBitmap_Base;
+ ::cppu::OWeakObject > CanvasBitmap_Base;
class CanvasBitmap : public CanvasBitmap_Base,
public RepaintTarget
@@ -85,7 +85,7 @@ namespace vclcanvas
/// Must be called with locked Solar mutex
CanvasBitmap( const BitmapEx& rBitmap,
::com::sun::star::rendering::XGraphicDevice& rDevice,
- const OutDevProviderSharedPtr& rOutDevProvider );
+ const OutDevProviderSharedPtr& rOutDevProvider );
// overridden because of mpDevice
virtual void SAL_CALL disposing();
@@ -99,7 +99,7 @@ namespace vclcanvas
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
- const ::Point& rPt,
+ const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const;
@@ -121,7 +121,7 @@ namespace vclcanvas
private:
/** MUST hold here, too, since CanvasHelper only contains a
- raw pointer (without refcounting)
+ raw pointer (without refcounting)
*/
::com::sun::star::uno::Reference<com::sun::star::rendering::XGraphicDevice> mxDevice;
};
diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx
index 39ee411bf34c..66fe12eb3cad 100644
--- a/canvas/source/vcl/canvasbitmaphelper.cxx
+++ b/canvas/source/vcl/canvasbitmaphelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,7 +61,7 @@ namespace vclcanvas
CanvasBitmapHelper::CanvasBitmapHelper() :
mpBackBuffer(),
mpOutDevReference()
- {
+ {
}
void CanvasBitmapHelper::setBitmap( const BitmapEx& rBitmap )
@@ -87,8 +87,8 @@ namespace vclcanvas
// forward new settings to base class (ref device, output
// surface, no protection (own backbuffer), alpha depends on
// whether BmpEx is transparent or not)
- CanvasHelper::init( rDevice,
- mpBackBuffer,
+ CanvasHelper::init( rDevice,
+ mpBackBuffer,
false,
rBitmap.IsTransparent() );
}
@@ -101,7 +101,7 @@ namespace vclcanvas
// forward to base class
CanvasHelper::disposing();
}
-
+
geometry::IntegerSize2D CanvasBitmapHelper::getSize()
{
if( !mpBackBuffer )
@@ -117,8 +117,8 @@ namespace vclcanvas
mpBackBuffer->clear(); // alpha vdev needs special treatment
}
- uno::Reference< rendering::XBitmap > CanvasBitmapHelper::getScaledBitmap( const geometry::RealSize2D& newSize,
- sal_Bool beFast )
+ uno::Reference< rendering::XBitmap > CanvasBitmapHelper::getScaledBitmap( const geometry::RealSize2D& newSize,
+ sal_Bool beFast )
{
ENSURE_OR_THROW( mpDevice,
"disposed CanvasHelper" );
@@ -130,15 +130,15 @@ namespace vclcanvas
BitmapEx aRes( mpBackBuffer->getBitmapReference() );
- aRes.Scale( ::vcl::unotools::sizeFromRealSize2D(newSize),
+ aRes.Scale( ::vcl::unotools::sizeFromRealSize2D(newSize),
beFast ? BMP_SCALE_FAST : BMP_SCALE_INTERPOLATE );
- return uno::Reference< rendering::XBitmap >(
+ return uno::Reference< rendering::XBitmap >(
new CanvasBitmap( aRes, *mpDevice, mpOutDevReference ) );
}
- uno::Sequence< sal_Int8 > CanvasBitmapHelper::getData( rendering::IntegerBitmapLayout& rLayout,
- const geometry::IntegerRectangle2D& rect )
+ uno::Sequence< sal_Int8 > CanvasBitmapHelper::getData( rendering::IntegerBitmapLayout& rLayout,
+ const geometry::IntegerRectangle2D& rect )
{
RTL_LOGFILE_CONTEXT( aLog, "::vclcanvas::CanvasBitmapHelper::getData()" );
@@ -151,7 +151,7 @@ namespace vclcanvas
ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(),
aBitmap );
- ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
+ ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
(BitmapReadAccess*)NULL : aAlpha.AcquireReadAccess(),
aAlpha );
@@ -160,24 +160,24 @@ namespace vclcanvas
// TODO(F1): Support more formats.
const Size aBmpSize( aBitmap.GetSizePixel() );
-
+
rLayout.ScanLines = aBmpSize.Height();
rLayout.ScanLineBytes = aBmpSize.Width()*4;
- rLayout.ScanLineStride = rLayout.ScanLineBytes;
+ rLayout.ScanLineStride = rLayout.ScanLineBytes;
- // for the time being, always return as BGRA
+ // for the time being, always return as BGRA
uno::Sequence< sal_Int8 > aRes( 4*aBmpSize.Width()*aBmpSize.Height() );
sal_Int8* pRes = aRes.getArray();
int nCurrPos(0);
- for( int y=rect.Y1;
- y<aBmpSize.Height() && y<rect.Y2;
+ for( int y=rect.Y1;
+ y<aBmpSize.Height() && y<rect.Y2;
++y )
{
if( pAlphaReadAccess.get() != NULL )
{
- for( int x=rect.X1;
- x<aBmpSize.Width() && x<rect.X2;
+ for( int x=rect.X1;
+ x<aBmpSize.Width() && x<rect.X2;
++x )
{
pRes[ nCurrPos++ ] = pReadAccess->GetColor( y, x ).GetRed();
@@ -188,8 +188,8 @@ namespace vclcanvas
}
else
{
- for( int x=rect.X1;
- x<aBmpSize.Width() && x<rect.X2;
+ for( int x=rect.X1;
+ x<aBmpSize.Width() && x<rect.X2;
++x )
{
pRes[ nCurrPos++ ] = pReadAccess->GetColor( y, x ).GetRed();
@@ -202,10 +202,10 @@ namespace vclcanvas
return aRes;
}
-
- void CanvasBitmapHelper::setData( const uno::Sequence< sal_Int8 >& data,
- const rendering::IntegerBitmapLayout& rLayout,
- const geometry::IntegerRectangle2D& rect )
+
+ void CanvasBitmapHelper::setData( const uno::Sequence< sal_Int8 >& data,
+ const rendering::IntegerBitmapLayout& rLayout,
+ const geometry::IntegerRectangle2D& rect )
{
RTL_LOGFILE_CONTEXT( aLog, "::vclcanvas::CanvasBitmapHelper::setData()" );
@@ -231,27 +231,27 @@ namespace vclcanvas
{
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(),
aBitmap );
- ScopedBitmapWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
+ ScopedBitmapWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
(BitmapWriteAccess*)NULL : aAlpha.AcquireWriteAccess(),
aAlpha );
if( pAlphaWriteAccess.get() )
{
DBG_ASSERT( pAlphaWriteAccess->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL ||
- pAlphaWriteAccess->GetScanlineFormat() == BMP_FORMAT_8BIT_TC_MASK,
+ pAlphaWriteAccess->GetScanlineFormat() == BMP_FORMAT_8BIT_TC_MASK,
"non-8bit alpha not supported!" );
- }
-
+ }
+
ENSURE_OR_THROW( pWriteAccess.get() != NULL,
"Could not acquire write access to bitmap" );
// TODO(F1): Support more formats.
- const Size aBmpSize( aBitmap.GetSizePixel() );
+ const Size aBmpSize( aBitmap.GetSizePixel() );
- // for the time being, always read as BGRA
+ // for the time being, always read as BGRA
int x, y, nCurrPos(0);
- for( y=rect.Y1;
- y<aBmpSize.Height() && y<rect.Y2;
+ for( y=rect.Y1;
+ y<aBmpSize.Height() && y<rect.Y2;
++y )
{
if( pAlphaWriteAccess.get() != NULL )
@@ -263,8 +263,8 @@ namespace vclcanvas
Scanline pScan = pWriteAccess->GetScanline( y );
Scanline pAScan = pAlphaWriteAccess->GetScanline( y );
- for( x=rect.X1;
- x<aBmpSize.Width() && x<rect.X2;
+ for( x=rect.X1;
+ x<aBmpSize.Width() && x<rect.X2;
++x )
{
*pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
@@ -273,9 +273,9 @@ namespace vclcanvas
data[ nCurrPos+2 ] ) );
nCurrPos += 3;
-
+
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<BYTE>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -286,8 +286,8 @@ namespace vclcanvas
Scanline pScan = pWriteAccess->GetScanline( y );
Scanline pAScan = pAlphaWriteAccess->GetScanline( y );
- for( x=rect.X1;
- x<aBmpSize.Width() && x<rect.X2;
+ for( x=rect.X1;
+ x<aBmpSize.Width() && x<rect.X2;
++x )
{
*pScan++ = data[ nCurrPos+2 ];
@@ -295,9 +295,9 @@ namespace vclcanvas
*pScan++ = data[ nCurrPos ];
nCurrPos += 3;
-
+
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<BYTE>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -308,8 +308,8 @@ namespace vclcanvas
Scanline pScan = pWriteAccess->GetScanline( y );
Scanline pAScan = pAlphaWriteAccess->GetScanline( y );
- for( x=rect.X1;
- x<aBmpSize.Width() && x<rect.X2;
+ for( x=rect.X1;
+ x<aBmpSize.Width() && x<rect.X2;
++x )
{
*pScan++ = data[ nCurrPos ];
@@ -317,9 +317,9 @@ namespace vclcanvas
*pScan++ = data[ nCurrPos+2 ];
nCurrPos += 3;
-
+
// cast to unsigned byte, for correct subtraction result
- *pAScan++ = static_cast<BYTE>(255 -
+ *pAScan++ = static_cast<BYTE>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ]));
}
}
@@ -327,19 +327,19 @@ namespace vclcanvas
default:
{
- for( x=rect.X1;
- x<aBmpSize.Width() && x<rect.X2;
+ for( x=rect.X1;
+ x<aBmpSize.Width() && x<rect.X2;
++x )
- {
+ {
pWriteAccess->SetPixel( y, x, BitmapColor( data[ nCurrPos ],
data[ nCurrPos+1 ],
data[ nCurrPos+2 ] ) );
nCurrPos += 3;
-
+
// cast to unsigned byte, for correct subtraction result
- pAlphaWriteAccess->SetPixel( y, x,
- BitmapColor(
- static_cast<BYTE>(255 -
+ pAlphaWriteAccess->SetPixel( y, x,
+ BitmapColor(
+ static_cast<BYTE>(255 -
static_cast<sal_uInt8>(data[ nCurrPos++ ])) ) );
}
}
@@ -356,8 +356,8 @@ namespace vclcanvas
{
Scanline pScan = pWriteAccess->GetScanline( y );
- for( x=rect.X1;
- x<aBmpSize.Width() && x<rect.X2;
+ for( x=rect.X1;
+ x<aBmpSize.Width() && x<rect.X2;
++x )
{
*pScan++ = (BYTE)pWriteAccess->GetBestPaletteIndex(
@@ -374,8 +374,8 @@ namespace vclcanvas
{
Scanline pScan = pWriteAccess->GetScanline( y );
- for( x=rect.X1;
- x<aBmpSize.Width() && x<rect.X2;
+ for( x=rect.X1;
+ x<aBmpSize.Width() && x<rect.X2;
++x )
{
*pScan++ = data[ nCurrPos+2 ];
@@ -391,8 +391,8 @@ namespace vclcanvas
{
Scanline pScan = pWriteAccess->GetScanline( y );
- for( x=rect.X1;
- x<aBmpSize.Width() && x<rect.X2;
+ for( x=rect.X1;
+ x<aBmpSize.Width() && x<rect.X2;
++x )
{
*pScan++ = data[ nCurrPos ];
@@ -406,8 +406,8 @@ namespace vclcanvas
default:
{
- for( x=rect.X1;
- x<aBmpSize.Width() && x<rect.X2;
+ for( x=rect.X1;
+ x<aBmpSize.Width() && x<rect.X2;
++x )
{
pWriteAccess->SetPixel( y, x, BitmapColor( data[ nCurrPos ],
@@ -431,14 +431,14 @@ namespace vclcanvas
if( aAlpha.IsEmpty() )
setBitmap( BitmapEx( aBitmap ) );
else
- setBitmap( BitmapEx( aBitmap,
+ setBitmap( BitmapEx( aBitmap,
AlphaMask( aAlpha ) ) );
}
}
- void CanvasBitmapHelper::setPixel( const uno::Sequence< sal_Int8 >& color,
- const rendering::IntegerBitmapLayout& rLayout,
- const geometry::IntegerPoint2D& pos )
+ void CanvasBitmapHelper::setPixel( const uno::Sequence< sal_Int8 >& color,
+ const rendering::IntegerBitmapLayout& rLayout,
+ const geometry::IntegerPoint2D& pos )
{
RTL_LOGFILE_CONTEXT( aLog, "::vclcanvas::CanvasBitmapHelper::setPixel()" );
@@ -447,11 +447,11 @@ namespace vclcanvas
const Size aBmpSize( mpBackBuffer->getBitmapReference().GetSizePixel() );
- ENSURE_ARG_OR_THROW( pos.X >= 0 && pos.X < aBmpSize.Width(),
+ ENSURE_ARG_OR_THROW( pos.X >= 0 && pos.X < aBmpSize.Width(),
"X coordinate out of bounds" );
- ENSURE_ARG_OR_THROW( pos.Y >= 0 && pos.Y < aBmpSize.Height(),
+ ENSURE_ARG_OR_THROW( pos.Y >= 0 && pos.Y < aBmpSize.Height(),
"Y coordinate out of bounds" );
- ENSURE_ARG_OR_THROW( color.getLength() > 3,
+ ENSURE_ARG_OR_THROW( color.getLength() > 3,
"not enough color components" );
const rendering::IntegerBitmapLayout aRefLayout( getMemoryLayout() );
@@ -473,7 +473,7 @@ namespace vclcanvas
{
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(),
aBitmap );
- ScopedBitmapWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
+ ScopedBitmapWriteAccess pAlphaWriteAccess( aAlpha.IsEmpty() ?
(BitmapWriteAccess*)NULL : aAlpha.AcquireWriteAccess(),
aAlpha );
@@ -497,12 +497,12 @@ namespace vclcanvas
if( aAlpha.IsEmpty() )
setBitmap( BitmapEx( aBitmap ) );
else
- setBitmap( BitmapEx( aBitmap,
+ setBitmap( BitmapEx( aBitmap,
AlphaMask( aAlpha ) ) );
}
}
- uno::Sequence< sal_Int8 > CanvasBitmapHelper::getPixel( rendering::IntegerBitmapLayout& rLayout,
+ uno::Sequence< sal_Int8 > CanvasBitmapHelper::getPixel( rendering::IntegerBitmapLayout& rLayout,
const geometry::IntegerPoint2D& pos )
{
RTL_LOGFILE_CONTEXT( aLog, "::vclcanvas::CanvasBitmapHelper::getPixel()" );
@@ -513,13 +513,13 @@ namespace vclcanvas
rLayout = getMemoryLayout();
rLayout.ScanLines = 1;
rLayout.ScanLineBytes = 4;
- rLayout.ScanLineStride = rLayout.ScanLineBytes;
+ rLayout.ScanLineStride = rLayout.ScanLineBytes;
const Size aBmpSize( mpBackBuffer->getBitmapReference().GetSizePixel() );
- ENSURE_ARG_OR_THROW( pos.X >= 0 && pos.X < aBmpSize.Width(),
+ ENSURE_ARG_OR_THROW( pos.X >= 0 && pos.X < aBmpSize.Width(),
"X coordinate out of bounds" );
- ENSURE_ARG_OR_THROW( pos.Y >= 0 && pos.Y < aBmpSize.Height(),
+ ENSURE_ARG_OR_THROW( pos.Y >= 0 && pos.Y < aBmpSize.Height(),
"Y coordinate out of bounds" );
Bitmap aBitmap( mpBackBuffer->getBitmapReference().GetBitmap() );
@@ -527,7 +527,7 @@ namespace vclcanvas
ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(),
aBitmap );
- ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
+ ScopedBitmapReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ?
(BitmapReadAccess*)NULL : aAlpha.AcquireReadAccess(),
aAlpha );
ENSURE_OR_THROW( pReadAccess.get() != NULL,
@@ -535,7 +535,7 @@ namespace vclcanvas
uno::Sequence< sal_Int8 > aRes( 4 );
sal_Int8* pRes = aRes.getArray();
-
+
const BitmapColor aColor( pReadAccess->GetColor( pos.Y, pos.X ) );
pRes[ 0 ] = aColor.GetRed();
pRes[ 1 ] = aColor.GetGreen();
diff --git a/canvas/source/vcl/canvasbitmaphelper.hxx b/canvas/source/vcl/canvasbitmaphelper.hxx
index f49acdd19c16..bcd5a2b1c3b7 100644
--- a/canvas/source/vcl/canvasbitmaphelper.hxx
+++ b/canvas/source/vcl/canvasbitmaphelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -93,24 +93,24 @@ namespace vclcanvas
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > queryBitmapCanvas();
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
- getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
- sal_Bool beFast );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
+ getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
+ sal_Bool beFast );
- ::com::sun::star::uno::Sequence< sal_Int8 >
- getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
- const ::com::sun::star::geometry::IntegerRectangle2D& rect );
+ ::com::sun::star::uno::Sequence< sal_Int8 >
+ getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
+ const ::com::sun::star::geometry::IntegerRectangle2D& rect );
- void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
- const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
- const ::com::sun::star::geometry::IntegerRectangle2D& rect );
+ void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
+ const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
+ const ::com::sun::star::geometry::IntegerRectangle2D& rect );
- void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
- const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
- const ::com::sun::star::geometry::IntegerPoint2D& pos );
+ void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
+ const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
+ const ::com::sun::star::geometry::IntegerPoint2D& pos );
- ::com::sun::star::uno::Sequence< sal_Int8 >
- getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
+ ::com::sun::star::uno::Sequence< sal_Int8 >
+ getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
::com::sun::star::rendering::IntegerBitmapLayout getMemoryLayout();
@@ -120,9 +120,9 @@ namespace vclcanvas
private:
- void setBitmap( const BitmapEx& rBitmap );
+ void setBitmap( const BitmapEx& rBitmap );
- BitmapBackBufferSharedPtr mpBackBuffer;
+ BitmapBackBufferSharedPtr mpBackBuffer;
OutDevProviderSharedPtr mpOutDevReference;
};
}
diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx
index 010422b6e093..b9e11d441ecf 100644
--- a/canvas/source/vcl/canvascustomsprite.cxx
+++ b/canvas/source/vcl/canvascustomsprite.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,16 +66,16 @@ namespace vclcanvas
const OutDevProviderSharedPtr& rOutDevProvider,
bool bShowSpriteBounds )
{
- ENSURE_OR_THROW( rOwningSpriteCanvas.get() &&
+ ENSURE_OR_THROW( rOwningSpriteCanvas.get() &&
rOutDevProvider,
"CanvasCustomSprite::CanvasCustomSprite(): Invalid sprite canvas" );
// setup back buffer
// -----------------
- const ::Size aSize(
+ const ::Size aSize(
static_cast<sal_Int32>( ::std::max( 1.0,
- ceil( rSpriteSize.Width ))), // round up to nearest int,
+ ceil( rSpriteSize.Width ))), // round up to nearest int,
// enforce sprite to have at
// least (1,1) pixel size
static_cast<sal_Int32>( ::std::max( 1.0,
@@ -86,7 +86,7 @@ namespace vclcanvas
pBackBuffer->setSize( aSize );
// create mask backbuffer, with one bit color depth
- BackBufferSharedPtr pBackBufferMask( new BackBuffer( rOutDevProvider->getOutDev(),
+ BackBufferSharedPtr pBackBufferMask( new BackBuffer( rOutDevProvider->getOutDev(),
true ) );
pBackBufferMask->setSize( aSize );
@@ -96,7 +96,7 @@ namespace vclcanvas
// disable font antialiasing (causes ugly shadows otherwise)
pBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_DISABLE_TEXT );
pBackBufferMask->getOutDev().SetAntialiasing( ANTIALIASING_DISABLE_TEXT );
-
+
// set mask vdev drawmode, such that everything is painted
// black. That leaves us with a binary image, white for
// background, black for painted content
@@ -110,8 +110,8 @@ namespace vclcanvas
// always render into back buffer, don't preserve state (it's
// our private VDev, after all), have notion of alpha
maCanvasHelper.init( rDevice,
- pBackBuffer,
- false,
+ pBackBuffer,
+ false,
true );
maCanvasHelper.setBackgroundOutDev( pBackBufferMask );
@@ -119,7 +119,7 @@ namespace vclcanvas
// setup sprite helper
// -------------------
- maSpriteHelper.init( rSpriteSize,
+ maSpriteHelper.init( rSpriteSize,
rOwningSpriteCanvas,
pBackBuffer,
pBackBufferMask,
@@ -154,7 +154,7 @@ namespace vclcanvas
{
uno::Sequence< ::rtl::OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
-
+
return aRet;
}
@@ -173,20 +173,20 @@ namespace vclcanvas
{
SolarMutexGuard aGuard;
- maSpriteHelper.redraw( rOutDev,
- rOrigOutputPos,
- mbSurfaceDirty,
+ maSpriteHelper.redraw( rOutDev,
+ rOrigOutputPos,
+ mbSurfaceDirty,
bBufferedUpdate );
-
+
mbSurfaceDirty = false;
}
- bool CanvasCustomSprite::repaint( const GraphicObjectSharedPtr& rGrf,
+ bool CanvasCustomSprite::repaint( const GraphicObjectSharedPtr& rGrf,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState,
- const ::Point& rPt,
- const ::Size& rSz,
- const GraphicAttr& rAttr ) const
+ const ::Point& rPt,
+ const ::Size& rSz,
+ const GraphicAttr& rAttr ) const
{
SolarMutexGuard aGuard;
diff --git a/canvas/source/vcl/canvascustomsprite.hxx b/canvas/source/vcl/canvascustomsprite.hxx
index 1753f80194d9..0990e950e16d 100644
--- a/canvas/source/vcl/canvascustomsprite.hxx
+++ b/canvas/source/vcl/canvascustomsprite.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,7 +59,7 @@ namespace vclcanvas
typedef ::cppu::WeakComponentImplHelper4< ::com::sun::star::rendering::XCustomSprite,
::com::sun::star::rendering::XBitmapCanvas,
::com::sun::star::rendering::XIntegerBitmap,
- ::com::sun::star::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
+ ::com::sun::star::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
/** Mixin Sprite
Have to mixin the Sprite interface before deriving from
@@ -83,10 +83,10 @@ namespace vclcanvas
};
typedef ::canvas::CanvasCustomSpriteBase< CanvasCustomSpriteSpriteBase_Base,
- SpriteHelper,
- CanvasHelper,
+ SpriteHelper,
+ CanvasHelper,
tools::LocalGuard,
- ::cppu::OWeakObject > CanvasCustomSpriteBaseT;
+ ::cppu::OWeakObject > CanvasCustomSpriteBaseT;
/* Definition of CanvasCustomSprite class */
@@ -107,7 +107,7 @@ namespace vclcanvas
// Classname Base doing refcount Base implementing the XComponent interface
// | | |
// V V V
- DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasCustomSprite, CanvasCustomSpriteBase_Base, ::cppu::WeakComponentImplHelperBase );
+ DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( CanvasCustomSprite, CanvasCustomSpriteBase_Base, ::cppu::WeakComponentImplHelperBase );
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
@@ -125,7 +125,7 @@ namespace vclcanvas
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
- const ::Point& rPt,
+ const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const;
};
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index 71962cf3b45c..c968150705f2 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,9 +46,9 @@ using namespace ::com::sun::star;
namespace vclcanvas
{
- CanvasFont::CanvasFont( const rendering::FontRequest& rFontRequest,
- const uno::Sequence< beans::PropertyValue >& ,
- const geometry::Matrix2D& rFontMatrix,
+ CanvasFont::CanvasFont( const rendering::FontRequest& rFontRequest,
+ const uno::Sequence< beans::PropertyValue >& ,
+ const geometry::Matrix2D& rFontMatrix,
rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDevProvider ) :
CanvasFont_Base( m_aMutex ),
@@ -83,13 +83,13 @@ namespace vclcanvas
const Size aSize = rOutDev.GetFontMetric( *maFont ).GetSize();
const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
- double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
-
+ double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
+
if( !::basegfx::fTools::equalZero( fDividend) )
fStretch /= fDividend;
-
+
const long nNewWidth = ::basegfx::fround( aSize.Width() * fStretch );
-
+
maFont->SetWidth( nNewWidth );
rOutDev.EnableMapMode(bOldMapState);
@@ -111,10 +111,10 @@ namespace vclcanvas
if( !mpRefDevice.is() )
return uno::Reference< rendering::XTextLayout >(); // we're disposed
- return new TextLayout( aText,
- nDirection,
- nRandomSeed,
- Reference( this ),
+ return new TextLayout( aText,
+ nDirection,
+ nRandomSeed,
+ Reference( this ),
mpRefDevice,
mpOutDevProvider);
}
diff --git a/canvas/source/vcl/canvasfont.hxx b/canvas/source/vcl/canvasfont.hxx
index 44cc9631f4f9..b58d0c8939a7 100644
--- a/canvas/source/vcl/canvasfont.hxx
+++ b/canvas/source/vcl/canvasfont.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,7 +57,7 @@ namespace vclcanvas
typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::rendering::XCanvasFont,
::com::sun::star::lang::XServiceInfo > CanvasFont_Base;
- class CanvasFont : public ::comphelper::OBaseMutex,
+ class CanvasFont : public ::comphelper::OBaseMutex,
public CanvasFont_Base,
private ::boost::noncopyable
{
@@ -66,9 +66,9 @@ namespace vclcanvas
CanvasFont,
::com::sun::star::rendering::XCanvasFont > Reference;
- CanvasFont( const ::com::sun::star::rendering::FontRequest& fontRequest,
- const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& extraFontProperties,
- const ::com::sun::star::geometry::Matrix2D& rFontMatrix,
+ CanvasFont( const ::com::sun::star::rendering::FontRequest& fontRequest,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& extraFontProperties,
+ const ::com::sun::star::geometry::Matrix2D& rFontMatrix,
::com::sun::star::rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDevProvider );
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 7ae02c7c3492..6946d256b387 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -79,7 +79,7 @@ namespace vclcanvas
basegfx::B2DLineJoin b2DJoineFromJoin( sal_Int8 nJoinType )
{
switch( nJoinType )
- {
+ {
case rendering::PathJoinType::NONE:
return basegfx::B2DLINEJOIN_NONE;
@@ -119,26 +119,26 @@ namespace vclcanvas
}
void CanvasHelper::init( rendering::XGraphicDevice& rDevice,
- const OutDevProviderSharedPtr& rOutDev,
- bool bProtect,
- bool bHaveAlpha )
+ const OutDevProviderSharedPtr& rOutDev,
+ bool bProtect,
+ bool bHaveAlpha )
{
// cast away const, need to change refcount (as this is
// ~invisible to client code, still logically const)
- mpDevice = &rDevice;
+ mpDevice = &rDevice;
mbHaveAlpha = bHaveAlpha;
setOutDev( rOutDev, bProtect );
}
- void CanvasHelper::setOutDev( const OutDevProviderSharedPtr& rOutDev,
- bool bProtect )
+ void CanvasHelper::setOutDev( const OutDevProviderSharedPtr& rOutDev,
+ bool bProtect )
{
if( bProtect )
mpProtectedOutDev = rOutDev;
else
mpProtectedOutDev.reset();
-
+
mpOutDev = rOutDev;
}
@@ -165,7 +165,7 @@ namespace vclcanvas
if( mp2ndOutDev )
{
OutputDevice& rOutDev2( mp2ndOutDev->getOutDev() );
-
+
rOutDev2.SetDrawMode( DRAWMODE_DEFAULT );
rOutDev2.EnableMapMode( FALSE );
rOutDev2.SetLineColor( COL_TRANSPARENT );
@@ -178,10 +178,10 @@ namespace vclcanvas
}
}
- void CanvasHelper::drawPoint( const rendering::XCanvas* ,
- const geometry::RealPoint2D& aPoint,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
+ void CanvasHelper::drawPoint( const rendering::XCanvas* ,
+ const geometry::RealPoint2D& aPoint,
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState )
{
// are we disposed?
if( mpOutDev )
@@ -200,11 +200,11 @@ namespace vclcanvas
}
}
- void CanvasHelper::drawLine( const rendering::XCanvas* ,
- const geometry::RealPoint2D& aStartRealPoint2D,
- const geometry::RealPoint2D& aEndRealPoint2D,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
+ void CanvasHelper::drawLine( const rendering::XCanvas* ,
+ const geometry::RealPoint2D& aStartRealPoint2D,
+ const geometry::RealPoint2D& aEndRealPoint2D,
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState )
{
// are we disposed?
if( mpOutDev )
@@ -225,24 +225,24 @@ namespace vclcanvas
}
}
- void CanvasHelper::drawBezier( const rendering::XCanvas* ,
- const geometry::RealBezierSegment2D& aBezierSegment,
- const geometry::RealPoint2D& _aEndPoint,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
+ void CanvasHelper::drawBezier( const rendering::XCanvas* ,
+ const geometry::RealBezierSegment2D& aBezierSegment,
+ const geometry::RealPoint2D& _aEndPoint,
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState )
{
if( mpOutDev )
{
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
setupOutDevState( viewState, renderState, LINE_COLOR );
- const Point& rStartPoint( tools::mapRealPoint2D( geometry::RealPoint2D(aBezierSegment.Px,
+ const Point& rStartPoint( tools::mapRealPoint2D( geometry::RealPoint2D(aBezierSegment.Px,
aBezierSegment.Py),
viewState, renderState ) );
- const Point& rCtrlPoint1( tools::mapRealPoint2D( geometry::RealPoint2D(aBezierSegment.C1x,
+ const Point& rCtrlPoint1( tools::mapRealPoint2D( geometry::RealPoint2D(aBezierSegment.C1x,
aBezierSegment.C1y),
viewState, renderState ) );
- const Point& rCtrlPoint2( tools::mapRealPoint2D( geometry::RealPoint2D(aBezierSegment.C2x,
+ const Point& rCtrlPoint2( tools::mapRealPoint2D( geometry::RealPoint2D(aBezierSegment.C2x,
aBezierSegment.C2y),
viewState, renderState ) );
const Point& rEndPoint( tools::mapRealPoint2D( _aEndPoint,
@@ -250,13 +250,13 @@ namespace vclcanvas
::Polygon aPoly(4);
aPoly.SetPoint( rStartPoint, 0 );
- aPoly.SetFlags( 0, POLY_NORMAL );
+ aPoly.SetFlags( 0, POLY_NORMAL );
aPoly.SetPoint( rCtrlPoint1, 1 );
- aPoly.SetFlags( 1, POLY_CONTROL );
+ aPoly.SetFlags( 1, POLY_CONTROL );
aPoly.SetPoint( rCtrlPoint2, 2 );
- aPoly.SetFlags( 2, POLY_CONTROL );
+ aPoly.SetFlags( 2, POLY_CONTROL );
aPoly.SetPoint( rEndPoint, 3 );
- aPoly.SetFlags( 3, POLY_NORMAL );
+ aPoly.SetFlags( 3, POLY_NORMAL );
// TODO(F2): alpha
mpOutDev->getOutDev().DrawPolygon( aPoly );
@@ -265,10 +265,10 @@ namespace vclcanvas
}
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawPolyPolygon( const rendering::XCanvas* ,
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawPolyPolygon( const rendering::XCanvas* ,
const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState )
{
ENSURE_ARG_OR_THROW( xPolyPolygon.is(),
"polygon is NULL");
@@ -278,14 +278,14 @@ namespace vclcanvas
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
setupOutDevState( viewState, renderState, LINE_COLOR );
- const ::basegfx::B2DPolyPolygon& rPolyPoly(
+ const ::basegfx::B2DPolyPolygon& rPolyPoly(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon) );
const PolyPolygon aPolyPoly( tools::mapPolyPolygon( rPolyPoly, viewState, renderState ) );
if( rPolyPoly.isClosed() )
{
mpOutDev->getOutDev().DrawPolyPolygon( aPolyPoly );
-
+
if( mp2ndOutDev )
mp2ndOutDev->getOutDev().DrawPolyPolygon( aPolyPoly );
}
@@ -303,7 +303,7 @@ namespace vclcanvas
for( USHORT i=0; i<nSize; ++i )
{
mpOutDev->getOutDev().DrawPolyLine( aPolyPoly[i] );
-
+
if( mp2ndOutDev )
mp2ndOutDev->getOutDev().DrawPolyLine( aPolyPoly[i] );
}
@@ -314,11 +314,11 @@ namespace vclcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL);
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::strokePolyPolygon( const rendering::XCanvas* ,
- const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const rendering::StrokeAttributes& strokeAttributes )
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::strokePolyPolygon( const rendering::XCanvas* ,
+ const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState,
+ const rendering::StrokeAttributes& strokeAttributes )
{
ENSURE_ARG_OR_THROW( xPolyPolygon.is(),
"polygon is NULL");
@@ -334,7 +334,7 @@ namespace vclcanvas
strokeAttributes.StrokeWidth);
aLinePixelSize *= aMatrix;
- ::basegfx::B2DPolyPolygon aPolyPoly(
+ ::basegfx::B2DPolyPolygon aPolyPoly(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon) );
if( aPolyPoly.areControlPointsUsed() )
@@ -355,11 +355,11 @@ namespace vclcanvas
{
// AW: new interface; You may also get gaps in the same run now
basegfx::tools::applyLineDashing(aPolyPoly.getB2DPolygon(i), aDashArray, &aDashedPolyPoly);
- //aDashedPolyPoly.append(
+ //aDashedPolyPoly.append(
// ::basegfx::tools::applyLineDashing( aPolyPoly.getB2DPolygon(i),
// aDashArray ) );
}
-
+
aPolyPoly = aDashedPolyPoly;
}
@@ -376,7 +376,7 @@ namespace vclcanvas
{
// render as a 'thick' line
setupOutDevState( viewState, renderState, FILL_COLOR );
-
+
for( sal_uInt32 i=0; i<aPolyPoly.count(); ++i )
{
// TODO(F2): Use MiterLimit from StrokeAttributes,
@@ -390,7 +390,7 @@ namespace vclcanvas
// AW: New interface, will create bezier polygons now
aStrokedPolyPoly.append(basegfx::tools::createAreaGeometry(
aPolyPoly.getB2DPolygon(i), strokeAttributes.StrokeWidth*0.5, b2DJoineFromJoin(strokeAttributes.JoinType)));
- //aStrokedPolyPoly.append(
+ //aStrokedPolyPoly.append(
// ::basegfx::tools::createAreaGeometryForPolygon( aPolyPoly.getB2DPolygon(i),
// strokeAttributes.StrokeWidth*0.5,
// b2DJoineFromJoin(strokeAttributes.JoinType) ) );
@@ -400,7 +400,7 @@ namespace vclcanvas
// transform only _now_, all the StrokeAttributes are in
// user coordinates.
aStrokedPolyPoly.transform( aMatrix );
-
+
const PolyPolygon aVCLPolyPoly( aStrokedPolyPoly );
// TODO(F2): When using alpha here, must handle that via
@@ -411,7 +411,7 @@ namespace vclcanvas
// via OutDev::DrawPolyPolygon(), on/off fill would
// generate off areas on those self-intersections.
USHORT nSize( aVCLPolyPoly.Count() );
-
+
for( USHORT i=0; i<nSize; ++i )
{
if( aStrokedPolyPoly.getB2DPolygon( i ).isClosed() ) {
@@ -440,40 +440,40 @@ namespace vclcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL);
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::strokeTexturedPolyPolygon( const rendering::XCanvas* ,
- const uno::Reference< rendering::XPolyPolygon2D >& ,
- const rendering::ViewState& ,
- const rendering::RenderState& ,
- const uno::Sequence< rendering::Texture >& ,
- const rendering::StrokeAttributes& )
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::strokeTexturedPolyPolygon( const rendering::XCanvas* ,
+ const uno::Reference< rendering::XPolyPolygon2D >& ,
+ const rendering::ViewState& ,
+ const rendering::RenderState& ,
+ const uno::Sequence< rendering::Texture >& ,
+ const rendering::StrokeAttributes& )
{
return uno::Reference< rendering::XCachedPrimitive >(NULL);
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::strokeTextureMappedPolyPolygon( const rendering::XCanvas* ,
- const uno::Reference< rendering::XPolyPolygon2D >& ,
- const rendering::ViewState& ,
- const rendering::RenderState& ,
- const uno::Sequence< rendering::Texture >& ,
- const uno::Reference< geometry::XMapping2D >& ,
- const rendering::StrokeAttributes& )
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::strokeTextureMappedPolyPolygon( const rendering::XCanvas* ,
+ const uno::Reference< rendering::XPolyPolygon2D >& ,
+ const rendering::ViewState& ,
+ const rendering::RenderState& ,
+ const uno::Sequence< rendering::Texture >& ,
+ const uno::Reference< geometry::XMapping2D >& ,
+ const rendering::StrokeAttributes& )
{
return uno::Reference< rendering::XCachedPrimitive >(NULL);
}
- uno::Reference< rendering::XPolyPolygon2D > CanvasHelper::queryStrokeShapes( const rendering::XCanvas* ,
- const uno::Reference< rendering::XPolyPolygon2D >& ,
- const rendering::ViewState& ,
- const rendering::RenderState& ,
- const rendering::StrokeAttributes& )
+ uno::Reference< rendering::XPolyPolygon2D > CanvasHelper::queryStrokeShapes( const rendering::XCanvas* ,
+ const uno::Reference< rendering::XPolyPolygon2D >& ,
+ const rendering::ViewState& ,
+ const rendering::RenderState& ,
+ const rendering::StrokeAttributes& )
{
return uno::Reference< rendering::XPolyPolygon2D >(NULL);
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::fillPolyPolygon( const rendering::XCanvas* ,
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::fillPolyPolygon( const rendering::XCanvas* ,
const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState )
{
ENSURE_ARG_OR_THROW( xPolyPolygon.is(),
"polygon is NULL");
@@ -487,7 +487,7 @@ namespace vclcanvas
::basegfx::B2DPolyPolygon aB2DPolyPoly(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon));
aB2DPolyPoly.setClosed(true); // ensure closed poly, otherwise VCL does not fill
- const PolyPolygon aPolyPoly( tools::mapPolyPolygon(
+ const PolyPolygon aPolyPoly( tools::mapPolyPolygon(
aB2DPolyPoly,
viewState, renderState ) );
const bool bSourceAlpha( renderState.CompositeOperation == rendering::CompositeOperation::SOURCE );
@@ -531,46 +531,46 @@ namespace vclcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL);
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::fillTextureMappedPolyPolygon( const rendering::XCanvas* ,
- const uno::Reference< rendering::XPolyPolygon2D >& ,
- const rendering::ViewState& ,
- const rendering::RenderState& ,
- const uno::Sequence< rendering::Texture >& ,
- const uno::Reference< geometry::XMapping2D >& )
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::fillTextureMappedPolyPolygon( const rendering::XCanvas* ,
+ const uno::Reference< rendering::XPolyPolygon2D >& ,
+ const rendering::ViewState& ,
+ const rendering::RenderState& ,
+ const uno::Sequence< rendering::Texture >& ,
+ const uno::Reference< geometry::XMapping2D >& )
{
return uno::Reference< rendering::XCachedPrimitive >(NULL);
}
- uno::Reference< rendering::XCanvasFont > CanvasHelper::createFont( const rendering::XCanvas* ,
- const rendering::FontRequest& fontRequest,
- const uno::Sequence< beans::PropertyValue >& extraFontProperties,
- const geometry::Matrix2D& fontMatrix )
+ uno::Reference< rendering::XCanvasFont > CanvasHelper::createFont( const rendering::XCanvas* ,
+ const rendering::FontRequest& fontRequest,
+ const uno::Sequence< beans::PropertyValue >& extraFontProperties,
+ const geometry::Matrix2D& fontMatrix )
{
if( mpOutDev && mpDevice )
{
// TODO(F2): font properties and font matrix
return uno::Reference< rendering::XCanvasFont >(
- new CanvasFont(fontRequest, extraFontProperties, fontMatrix,
+ new CanvasFont(fontRequest, extraFontProperties, fontMatrix,
*mpDevice, mpOutDev) );
}
return uno::Reference< rendering::XCanvasFont >();
}
- uno::Sequence< rendering::FontInfo > CanvasHelper::queryAvailableFonts( const rendering::XCanvas* ,
- const rendering::FontInfo& ,
- const uno::Sequence< beans::PropertyValue >& )
+ uno::Sequence< rendering::FontInfo > CanvasHelper::queryAvailableFonts( const rendering::XCanvas* ,
+ const rendering::FontInfo& ,
+ const uno::Sequence< beans::PropertyValue >& )
{
// TODO(F2)
return uno::Sequence< rendering::FontInfo >();
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawText( const rendering::XCanvas* ,
- const rendering::StringContext& text,
- const uno::Reference< rendering::XCanvasFont >& xFont,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- sal_Int8 textDirection )
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawText( const rendering::XCanvas* ,
+ const rendering::StringContext& text,
+ const uno::Reference< rendering::XCanvasFont >& xFont,
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState,
+ sal_Int8 textDirection )
{
ENSURE_ARG_OR_THROW( xFont.is(),
"font is NULL");
@@ -624,10 +624,10 @@ namespace vclcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL);
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawTextLayout( const rendering::XCanvas* ,
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawTextLayout( const rendering::XCanvas* ,
const uno::Reference< rendering::XTextLayout >& xLayoutedText,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState )
{
ENSURE_ARG_OR_THROW( xLayoutedText.is(),
"layout is NULL");
@@ -666,11 +666,11 @@ namespace vclcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL);
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::implDrawBitmap( const rendering::XCanvas* pCanvas,
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::implDrawBitmap( const rendering::XCanvas* pCanvas,
const uno::Reference< rendering::XBitmap >& xBitmap,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- bool bModulateColors )
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState,
+ bool bModulateColors )
{
ENSURE_ARG_OR_THROW( xBitmap.is(),
"bitmap is NULL");
@@ -736,12 +736,12 @@ namespace vclcanvas
// color modulation is requested), decompose to check
// whether GraphicObject suffices
::basegfx::B2DVector aScale;
- double nRotate;
- double nShearX;
+ double nRotate;
+ double nShearX;
aMatrix.decompose( aScale, aOutputPos, nRotate, nShearX );
-
- GraphicAttr aGrfAttr;
- GraphicObjectSharedPtr pGrfObj;
+
+ GraphicAttr aGrfAttr;
+ GraphicObjectSharedPtr pGrfObj;
::Size aBmpSize( aBmpEx.GetSizePixel() );
@@ -759,8 +759,8 @@ namespace vclcanvas
// transOrig*transModulate (which would be
// equivalent to the origAlpha*modulateAlpha the
// DX canvas performs)
- aGrfAttr.SetTransparency(
- static_cast< BYTE >(
+ aGrfAttr.SetTransparency(
+ static_cast< BYTE >(
::basegfx::fround( 255.0*( 1.0 - nAlphaModulation ) ) ) );
}
@@ -788,8 +788,8 @@ namespace vclcanvas
// modify output position, to account for the fact
// that transformBitmap() always normalizes its output
// bitmap into the smallest enclosing box.
- ::basegfx::B2DRectangle aDestRect;
- ::canvas::tools::calcTransformedRectBounds( aDestRect,
+ ::basegfx::B2DRectangle aDestRect;
+ ::canvas::tools::calcTransformedRectBounds( aDestRect,
::basegfx::B2DRectangle(0,
0,
aBmpSize.Width(),
@@ -802,7 +802,7 @@ namespace vclcanvas
// complex transformation, use generic affine bitmap
// transformation
aBmpEx = tools::transformBitmap( aBmpEx,
- aMatrix,
+ aMatrix,
renderState.DeviceColor,
tools::MODULATE_NONE );
@@ -831,7 +831,7 @@ namespace vclcanvas
aPt,
aSz,
&aGrfAttr );
-
+
// created GraphicObject, which possibly cached
// display bitmap - return cache object, to retain
// that information.
@@ -854,24 +854,24 @@ namespace vclcanvas
return uno::Reference< rendering::XCachedPrimitive >(NULL);
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawBitmap( const rendering::XCanvas* pCanvas,
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawBitmap( const rendering::XCanvas* pCanvas,
const uno::Reference< rendering::XBitmap >& xBitmap,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState )
{
- return implDrawBitmap( pCanvas,
+ return implDrawBitmap( pCanvas,
xBitmap,
viewState,
renderState,
false );
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawBitmapModulated( const rendering::XCanvas* pCanvas,
- const uno::Reference< rendering::XBitmap >& xBitmap,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState )
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::drawBitmapModulated( const rendering::XCanvas* pCanvas,
+ const uno::Reference< rendering::XBitmap >& xBitmap,
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState )
{
- return implDrawBitmap( pCanvas,
+ return implDrawBitmap( pCanvas,
xBitmap,
viewState,
renderState,
@@ -885,18 +885,18 @@ namespace vclcanvas
return uno::Reference< rendering::XGraphicDevice >(mpDevice);
}
- void CanvasHelper::copyRect( const rendering::XCanvas* ,
- const uno::Reference< rendering::XBitmapCanvas >& ,
- const geometry::RealRectangle2D& ,
- const rendering::ViewState& ,
- const rendering::RenderState& ,
- const geometry::RealRectangle2D& ,
- const rendering::ViewState& ,
- const rendering::RenderState& )
+ void CanvasHelper::copyRect( const rendering::XCanvas* ,
+ const uno::Reference< rendering::XBitmapCanvas >& ,
+ const geometry::RealRectangle2D& ,
+ const rendering::ViewState& ,
+ const rendering::RenderState& ,
+ const geometry::RealRectangle2D& ,
+ const rendering::ViewState& ,
+ const rendering::RenderState& )
{
// TODO(F1)
}
-
+
geometry::IntegerSize2D CanvasHelper::getSize()
{
if( !mpOutDev.get() )
@@ -905,8 +905,8 @@ namespace vclcanvas
return ::vcl::unotools::integerSize2DFromSize( mpOutDev->getOutDev().GetOutputSizePixel() );
}
- uno::Reference< rendering::XBitmap > CanvasHelper::getScaledBitmap( const geometry::RealSize2D& newSize,
- sal_Bool beFast )
+ uno::Reference< rendering::XBitmap > CanvasHelper::getScaledBitmap( const geometry::RealSize2D& newSize,
+ sal_Bool beFast )
{
if( !mpOutDev.get() || !mpDevice )
return uno::Reference< rendering::XBitmap >(); // we're disposed
@@ -922,14 +922,14 @@ namespace vclcanvas
Bitmap aBitmap( rOutDev.GetBitmap(aEmptyPoint, aBmpSize) );
- aBitmap.Scale( ::vcl::unotools::sizeFromRealSize2D(newSize),
+ aBitmap.Scale( ::vcl::unotools::sizeFromRealSize2D(newSize),
beFast ? BMP_SCALE_FAST : BMP_SCALE_INTERPOLATE );
- return uno::Reference< rendering::XBitmap >(
+ return uno::Reference< rendering::XBitmap >(
new CanvasBitmap( aBitmap, *mpDevice, mpOutDev ) );
}
- uno::Sequence< sal_Int8 > CanvasHelper::getData( rendering::IntegerBitmapLayout& rLayout,
+ uno::Sequence< sal_Int8 > CanvasHelper::getData( rendering::IntegerBitmapLayout& rLayout,
const geometry::IntegerRectangle2D& rect )
{
if( !mpOutDev.get() )
@@ -938,14 +938,14 @@ namespace vclcanvas
rLayout = getMemoryLayout();
// TODO(F2): Support alpha canvas here
- const Rectangle aRect( ::vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
+ const Rectangle aRect( ::vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
OutputDevice& rOutDev( mpOutDev->getOutDev() );
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
rOutDev.EnableMapMode( FALSE );
- Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(),
+ Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(),
aRect.GetSize()) );
ScopedBitmapReadAccess pReadAccess( aBitmap.AcquireReadAccess(),
@@ -959,7 +959,7 @@ namespace vclcanvas
rLayout.ScanLines = nHeight;
rLayout.ScanLineBytes = nWidth*4;
- rLayout.ScanLineStride = rLayout.ScanLineBytes;
+ rLayout.ScanLineStride = rLayout.ScanLineBytes;
uno::Sequence< sal_Int8 > aRes( 4*nWidth*nHeight );
sal_Int8* pRes = aRes.getArray();
@@ -979,9 +979,9 @@ namespace vclcanvas
return aRes;
}
- void CanvasHelper::setData( const uno::Sequence< sal_Int8 >& data,
- const rendering::IntegerBitmapLayout& aLayout,
- const geometry::IntegerRectangle2D& rect )
+ void CanvasHelper::setData( const uno::Sequence< sal_Int8 >& data,
+ const rendering::IntegerBitmapLayout& aLayout,
+ const geometry::IntegerRectangle2D& rect )
{
if( !mpOutDev.get() )
return; // we're disposed
@@ -999,7 +999,7 @@ namespace vclcanvas
rOutDev.EnableMapMode( FALSE );
const Rectangle aRect( ::vcl::unotools::rectangleFromIntegerRectangle2D(rect) );
- const USHORT nBitCount( ::std::min( (USHORT)24U,
+ const USHORT nBitCount( ::std::min( (USHORT)24U,
(USHORT)rOutDev.GetBitCount() ) );
const BitmapPalette* pPalette = NULL;
@@ -1013,7 +1013,7 @@ namespace vclcanvas
const Size aSize(1,1);
Bitmap aTmpBitmap( rOutDev.GetBitmap( aEmptyPoint,
aSize ) );
-
+
ScopedBitmapReadAccess pReadAccess( aTmpBitmap.AcquireReadAccess(),
aTmpBitmap );
@@ -1028,11 +1028,11 @@ namespace vclcanvas
{
ScopedBitmapWriteAccess pWriteAccess( aBitmap.AcquireWriteAccess(),
aBitmap );
-
+
ENSURE_OR_THROW( pWriteAccess.get() != NULL,
"Could not acquire write access to OutDev bitmap" );
- // for the time being, always read as RGB
+ // for the time being, always read as RGB
const sal_Int32 nWidth( rect.X2 - rect.X1 );
const sal_Int32 nHeight( rect.Y2 - rect.Y1 );
int x, y, nCurrPos(0);
@@ -1112,9 +1112,9 @@ namespace vclcanvas
}
}
- void CanvasHelper::setPixel( const uno::Sequence< sal_Int8 >& color,
- const rendering::IntegerBitmapLayout& rLayout,
- const geometry::IntegerPoint2D& pos )
+ void CanvasHelper::setPixel( const uno::Sequence< sal_Int8 >& color,
+ const rendering::IntegerBitmapLayout& rLayout,
+ const geometry::IntegerPoint2D& pos )
{
if( !mpOutDev.get() )
return; // we're disposed
@@ -1126,11 +1126,11 @@ namespace vclcanvas
const Size aBmpSize( rOutDev.GetOutputSizePixel() );
- ENSURE_ARG_OR_THROW( pos.X >= 0 && pos.X < aBmpSize.Width(),
+ ENSURE_ARG_OR_THROW( pos.X >= 0 && pos.X < aBmpSize.Width(),
"X coordinate out of bounds" );
- ENSURE_ARG_OR_THROW( pos.Y >= 0 && pos.Y < aBmpSize.Height(),
+ ENSURE_ARG_OR_THROW( pos.Y >= 0 && pos.Y < aBmpSize.Height(),
"Y coordinate out of bounds" );
- ENSURE_ARG_OR_THROW( color.getLength() > 3,
+ ENSURE_ARG_OR_THROW( color.getLength() > 3,
"not enough color components" );
const rendering::IntegerBitmapLayout aRefLayout( getMemoryLayout() );
@@ -1141,11 +1141,11 @@ namespace vclcanvas
"Mismatching memory layout" );
// TODO(F2): Support alpha canvas here
- rOutDev.DrawPixel( ::vcl::unotools::pointFromIntegerPoint2D( pos ),
+ rOutDev.DrawPixel( ::vcl::unotools::pointFromIntegerPoint2D( pos ),
::canvas::tools::stdIntSequenceToColor( color ));
}
- uno::Sequence< sal_Int8 > CanvasHelper::getPixel( rendering::IntegerBitmapLayout& rLayout,
+ uno::Sequence< sal_Int8 > CanvasHelper::getPixel( rendering::IntegerBitmapLayout& rLayout,
const geometry::IntegerPoint2D& pos )
{
if( !mpOutDev.get() )
@@ -1154,7 +1154,7 @@ namespace vclcanvas
rLayout = getMemoryLayout();
rLayout.ScanLines = 1;
rLayout.ScanLineBytes = 4;
- rLayout.ScanLineStride = rLayout.ScanLineBytes;
+ rLayout.ScanLineStride = rLayout.ScanLineBytes;
OutputDevice& rOutDev( mpOutDev->getOutDev() );
@@ -1163,15 +1163,15 @@ namespace vclcanvas
const Size aBmpSize( rOutDev.GetOutputSizePixel() );
- ENSURE_ARG_OR_THROW( pos.X >= 0 && pos.X < aBmpSize.Width(),
+ ENSURE_ARG_OR_THROW( pos.X >= 0 && pos.X < aBmpSize.Width(),
"X coordinate out of bounds" );
- ENSURE_ARG_OR_THROW( pos.Y >= 0 && pos.Y < aBmpSize.Height(),
+ ENSURE_ARG_OR_THROW( pos.Y >= 0 && pos.Y < aBmpSize.Height(),
"Y coordinate out of bounds" );
// TODO(F2): Support alpha canvas here
return ::canvas::tools::colorToStdIntSequence(
- rOutDev.GetPixel(
- ::vcl::unotools::pointFromIntegerPoint2D( pos )));
+ rOutDev.GetPixel(
+ ::vcl::unotools::pointFromIntegerPoint2D( pos )));
}
rendering::IntegerBitmapLayout CanvasHelper::getMemoryLayout()
@@ -1182,11 +1182,11 @@ namespace vclcanvas
return ::canvas::tools::getStdMemoryLayout(getSize());
}
- int CanvasHelper::setupOutDevState( const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- ColorType eColorType ) const
+ int CanvasHelper::setupOutDevState( const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState,
+ ColorType eColorType ) const
{
- ENSURE_OR_THROW( mpOutDev.get(),
+ ENSURE_OR_THROW( mpOutDev.get(),
"outdev null. Are we disposed?" );
::canvas::tools::verifyInput( renderState,
@@ -1215,7 +1215,7 @@ namespace vclcanvas
if( viewState.Clip.is() )
{
- ::basegfx::B2DPolyPolygon aClipPoly(
+ ::basegfx::B2DPolyPolygon aClipPoly(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(viewState.Clip) );
if( aClipPoly.count() )
@@ -1223,9 +1223,9 @@ namespace vclcanvas
// setup non-empty clipping
::basegfx::B2DHomMatrix aMatrix;
aClipPoly.transform(
- ::basegfx::unotools::homMatrixFromAffineMatrix( aMatrix,
+ ::basegfx::unotools::homMatrixFromAffineMatrix( aMatrix,
viewState.AffineTransform ) );
-
+
aClipRegion = Region::GetRegionFromPolyPolygon( ::PolyPolygon( aClipPoly ) );
}
else
@@ -1237,12 +1237,12 @@ namespace vclcanvas
if( renderState.Clip.is() )
{
- ::basegfx::B2DPolyPolygon aClipPoly(
+ ::basegfx::B2DPolyPolygon aClipPoly(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(renderState.Clip) );
::basegfx::B2DHomMatrix aMatrix;
aClipPoly.transform(
- ::canvas::tools::mergeViewAndRenderTransform( aMatrix,
+ ::canvas::tools::mergeViewAndRenderTransform( aMatrix,
viewState,
renderState ) );
@@ -1268,14 +1268,14 @@ namespace vclcanvas
if( aClipRegion.IsNull() )
{
rOutDev.SetClipRegion();
-
+
if( p2ndOutDev )
p2ndOutDev->SetClipRegion();
}
else
{
rOutDev.SetClipRegion( aClipRegion );
-
+
if( p2ndOutDev )
p2ndOutDev->SetClipRegion( aClipRegion );
}
@@ -1327,7 +1327,7 @@ namespace vclcanvas
break;
default:
- ENSURE_OR_THROW( false,
+ ENSURE_OR_THROW( false,
"Unexpected color type");
break;
}
@@ -1336,12 +1336,12 @@ namespace vclcanvas
return nTransparency;
}
- bool CanvasHelper::setupTextOutput( ::Point& o_rOutPos,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Reference< rendering::XCanvasFont >& xFont ) const
+ bool CanvasHelper::setupTextOutput( ::Point& o_rOutPos,
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState,
+ const uno::Reference< rendering::XCanvasFont >& xFont ) const
{
- ENSURE_OR_THROW( mpOutDev.get(),
+ ENSURE_OR_THROW( mpOutDev.get(),
"outdev null. Are we disposed?" );
setupOutDevState( viewState, renderState, TEXT_COLOR );
@@ -1351,7 +1351,7 @@ namespace vclcanvas
::Font aVCLFont;
CanvasFont* pFont = dynamic_cast< CanvasFont* >( xFont.get() );
-
+
ENSURE_ARG_OR_THROW( pFont,
"Font not compatible with this canvas" );
@@ -1381,12 +1381,12 @@ namespace vclcanvas
return true;
}
- bool CanvasHelper::repaint( const GraphicObjectSharedPtr& rGrf,
+ bool CanvasHelper::repaint( const GraphicObjectSharedPtr& rGrf,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState,
- const ::Point& rPt,
- const ::Size& rSz,
- const GraphicAttr& rAttr ) const
+ const ::Point& rPt,
+ const ::Size& rSz,
+ const GraphicAttr& rAttr ) const
{
ENSURE_OR_RETURN_FALSE( rGrf,
"Invalid Graphic" );
@@ -1408,7 +1408,7 @@ namespace vclcanvas
return true;
}
}
-
+
void CanvasHelper::flush() const
{
if( mpOutDev && mpOutDev->getOutDev().GetOutDevType() == OUTDEV_WINDOW )
diff --git a/canvas/source/vcl/canvashelper.hxx b/canvas/source/vcl/canvashelper.hxx
index ebc0d58624c7..a54491ca256e 100644
--- a/canvas/source/vcl/canvashelper.hxx
+++ b/canvas/source/vcl/canvashelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -85,7 +85,7 @@ namespace vclcanvas
When true, hasAlpha() will always return true, otherwise, false.
*/
void init( ::com::sun::star::rendering::XGraphicDevice& rDevice,
- const OutDevProviderSharedPtr& rOutDev,
+ const OutDevProviderSharedPtr& rOutDev,
bool bProtect,
bool bHaveAlpha );
@@ -94,8 +94,8 @@ namespace vclcanvas
This changes the primary output device, where rendering is
sent to.
*/
- void setOutDev( const OutDevProviderSharedPtr& rOutDev,
- bool bProtect);
+ void setOutDev( const OutDevProviderSharedPtr& rOutDev,
+ bool bProtect);
/** Set secondary output device
@@ -110,164 +110,164 @@ namespace vclcanvas
// XCanvas (only providing, not implementing the
// interface. Also note subtle method parameter differences)
void clear();
- void drawPoint( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::geometry::RealPoint2D& aPoint,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- void drawLine( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::geometry::RealPoint2D& aStartPoint,
- const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- void drawBezier( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::geometry::RealBezierSegment2D& aBezierSegment,
- const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- drawPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- strokePolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
+ void drawPoint( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::geometry::RealPoint2D& aPoint,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState );
+ void drawLine( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::geometry::RealPoint2D& aStartPoint,
+ const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState );
+ void drawBezier( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::geometry::RealBezierSegment2D& aBezierSegment,
+ const ::com::sun::star::geometry::RealPoint2D& aEndPoint,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ drawPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ strokePolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- strokeTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::rendering::Texture >& textures,
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ strokeTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::rendering::Texture >& textures,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- strokeTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::rendering::Texture >& textures,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::geometry::XMapping2D >& xMapping,
- const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
- queryStrokeShapes( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ strokeTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::rendering::Texture >& textures,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::geometry::XMapping2D >& xMapping,
+ const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >
+ queryStrokeShapes( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState,
const ::com::sun::star::rendering::StrokeAttributes& strokeAttributes );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- fillPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- fillTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::rendering::Texture >& textures );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- fillTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::rendering::Texture >& textures,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::geometry::XMapping2D >& xMapping );
-
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont >
- createFont( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::rendering::FontRequest& fontRequest,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::beans::PropertyValue >& extraFontProperties,
- const ::com::sun::star::geometry::Matrix2D& fontMatrix );
-
- ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::FontInfo >
- queryAvailableFonts( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::rendering::FontInfo& aFilter,
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::beans::PropertyValue >& aFontProperties );
-
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- drawText( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::rendering::StringContext& text,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XCanvasFont >& xFont,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- sal_Int8 textDirection );
-
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- drawTextLayout( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XTextLayout >& layoutetText,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
-
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- drawBitmap( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap >& xBitmap,
- const ::com::sun::star::rendering::ViewState& viewState,
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ fillPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ fillTexturedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::rendering::Texture >& textures );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ fillTextureMappedPolyPolygon( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XPolyPolygon2D >& xPolyPolygon,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::rendering::Texture >& textures,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::geometry::XMapping2D >& xMapping );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont >
+ createFont( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::rendering::FontRequest& fontRequest,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& extraFontProperties,
+ const ::com::sun::star::geometry::Matrix2D& fontMatrix );
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::FontInfo >
+ queryAvailableFonts( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::rendering::FontInfo& aFilter,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& aFontProperties );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ drawText( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::rendering::StringContext& text,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XCanvasFont >& xFont,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState,
+ sal_Int8 textDirection );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ drawTextLayout( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XTextLayout >& layoutetText,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ drawBitmap( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XBitmap >& xBitmap,
+ const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- drawBitmapModulated( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap >& xBitmap,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ drawBitmapModulated( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XBitmap >& xBitmap,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >
getDevice();
// BitmapCanvasHelper functionality
// ================================
- void copyRect( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmapCanvas >& sourceCanvas,
- const ::com::sun::star::geometry::RealRectangle2D& sourceRect,
- const ::com::sun::star::rendering::ViewState& sourceViewState,
- const ::com::sun::star::rendering::RenderState& sourceRenderState,
- const ::com::sun::star::geometry::RealRectangle2D& destRect,
- const ::com::sun::star::rendering::ViewState& destViewState,
- const ::com::sun::star::rendering::RenderState& destRenderState );
-
+ void copyRect( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XBitmapCanvas >& sourceCanvas,
+ const ::com::sun::star::geometry::RealRectangle2D& sourceRect,
+ const ::com::sun::star::rendering::ViewState& sourceViewState,
+ const ::com::sun::star::rendering::RenderState& sourceRenderState,
+ const ::com::sun::star::geometry::RealRectangle2D& destRect,
+ const ::com::sun::star::rendering::ViewState& destViewState,
+ const ::com::sun::star::rendering::RenderState& destRenderState );
+
::com::sun::star::geometry::IntegerSize2D getSize();
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > queryBitmapCanvas();
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
- getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
- sal_Bool beFast );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap >
+ getScaledBitmap( const ::com::sun::star::geometry::RealSize2D& newSize,
+ sal_Bool beFast );
- ::com::sun::star::uno::Sequence< sal_Int8 >
- getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
- const ::com::sun::star::geometry::IntegerRectangle2D& rect );
+ ::com::sun::star::uno::Sequence< sal_Int8 >
+ getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
+ const ::com::sun::star::geometry::IntegerRectangle2D& rect );
- void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
- const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
- const ::com::sun::star::geometry::IntegerRectangle2D& rect );
+ void setData( const ::com::sun::star::uno::Sequence< sal_Int8 >& data,
+ const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
+ const ::com::sun::star::geometry::IntegerRectangle2D& rect );
- void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
- const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
- const ::com::sun::star::geometry::IntegerPoint2D& pos );
+ void setPixel( const ::com::sun::star::uno::Sequence< sal_Int8 >& color,
+ const ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
+ const ::com::sun::star::geometry::IntegerPoint2D& pos );
- ::com::sun::star::uno::Sequence< sal_Int8 >
- getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
+ ::com::sun::star::uno::Sequence< sal_Int8 >
+ getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout,
const ::com::sun::star::geometry::IntegerPoint2D& pos );
::com::sun::star::rendering::IntegerBitmapLayout getMemoryLayout();
@@ -276,7 +276,7 @@ namespace vclcanvas
bool repaint( const GraphicObjectSharedPtr& rGrf,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
- const ::Point& rPt,
+ const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const;
@@ -292,11 +292,11 @@ namespace vclcanvas
{
LINE_COLOR, FILL_COLOR, TEXT_COLOR, IGNORE_COLOR
};
-
+
// returns transparency of color
- int setupOutDevState( const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- ColorType eColorType ) const;
+ int setupOutDevState( const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState,
+ ColorType eColorType ) const;
/** Called from XCanvas base classes, to notify that content
is _about_ to change
@@ -326,18 +326,18 @@ namespace vclcanvas
bool mbHaveAlpha;
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
- implDrawBitmap( const ::com::sun::star::rendering::XCanvas* rCanvas,
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap >& xBitmap,
- const ::com::sun::star::rendering::ViewState& viewState,
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCachedPrimitive >
+ implDrawBitmap( const ::com::sun::star::rendering::XCanvas* rCanvas,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XBitmap >& xBitmap,
+ const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
- bool bModulateColors );
+ bool bModulateColors );
- bool setupTextOutput( ::Point& o_rOutPos,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont >& xFont ) const;
+ bool setupTextOutput( ::Point& o_rOutPos,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont >& xFont ) const;
};
}
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 4d08f873deb1..a616ec7c6a9e 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -79,19 +79,19 @@ namespace vclcanvas
{
namespace
{
- bool textureFill( OutputDevice& rOutDev,
- GraphicObject& rGraphic,
- const ::Point& rPosPixel,
- const ::Size& rNextTileX,
- const ::Size& rNextTileY,
- sal_Int32 nTilesX,
- sal_Int32 nTilesY,
- const ::Size& rTileSize,
- const GraphicAttr& rAttr)
+ bool textureFill( OutputDevice& rOutDev,
+ GraphicObject& rGraphic,
+ const ::Point& rPosPixel,
+ const ::Size& rNextTileX,
+ const ::Size& rNextTileY,
+ sal_Int32 nTilesX,
+ sal_Int32 nTilesY,
+ const ::Size& rTileSize,
+ const GraphicAttr& rAttr)
{
- BOOL bRet( false );
- Point aCurrPos;
- int nX, nY;
+ BOOL bRet( false );
+ Point aCurrPos;
+ int nX, nY;
for( nY=0; nY < nTilesY; ++nY )
{
@@ -102,11 +102,11 @@ namespace vclcanvas
{
// update return value. This method should return true, if
// at least one of the looped Draws succeeded.
- bRet |= rGraphic.Draw( &rOutDev,
+ bRet |= rGraphic.Draw( &rOutDev,
aCurrPos,
rTileSize,
&rAttr );
-
+
aCurrPos.X() += rNextTileX.Width();
aCurrPos.Y() += rNextTileX.Height();
}
@@ -121,10 +121,10 @@ namespace vclcanvas
Since most of the code for linear and axial gradients are
the same, we've a unified method here
*/
- void fillLinearGradient( OutputDevice& rOutDev,
- const ::basegfx::B2DHomMatrix& rTextureTransform,
- const ::Rectangle& rBounds,
- unsigned int nStepCount,
+ void fillLinearGradient( OutputDevice& rOutDev,
+ const ::basegfx::B2DHomMatrix& rTextureTransform,
+ const ::Rectangle& rBounds,
+ unsigned int nStepCount,
const ::canvas::ParametricPolyPolygon::Values& rValues,
const std::vector< ::Color >& rColors )
{
@@ -137,23 +137,23 @@ namespace vclcanvas
::basegfx::B2DPoint aRightTop( 1.0, 0.0 );
::basegfx::B2DPoint aRightBottom( 1.0, 1.0 );
- aLeftTop *= rTextureTransform;
+ aLeftTop *= rTextureTransform;
aLeftBottom *= rTextureTransform;
- aRightTop *= rTextureTransform;
+ aRightTop *= rTextureTransform;
aRightBottom*= rTextureTransform;
// calc length of bound rect diagonal
- const ::basegfx::B2DVector aBoundRectDiagonal(
+ const ::basegfx::B2DVector aBoundRectDiagonal(
::vcl::unotools::b2DPointFromPoint( rBounds.TopLeft() ) -
::vcl::unotools::b2DPointFromPoint( rBounds.BottomRight() ) );
const double nDiagonalLength( aBoundRectDiagonal.getLength() );
// create direction of gradient:
// _______
- // | | |
+ // | | |
// -> | | | ...
- // | | |
- // -------
+ // | | |
+ // -------
::basegfx::B2DVector aDirection( aRightTop - aLeftTop );
aDirection.normalize();
@@ -165,7 +165,7 @@ namespace vclcanvas
aRightTop,
aRightBottom,
::vcl::unotools::b2DRectangleFromRectangle( rBounds ) );
-
+
// render gradient
// ===============
@@ -184,7 +184,7 @@ namespace vclcanvas
OSL_ENSURE( nStepCount >= 3,
"fillLinearGradient(): stepcount smaller than 3" );
-
+
// fill initial strip (extending two times the bound rect's
// diagonal to the 'left'
// ------------------------------------------------------
@@ -205,7 +205,7 @@ namespace vclcanvas
// iteratively render all other strips
// -----------------------------------
-
+
// ensure that nStepCount matches color stop parity, to
// have a well-defined middle color e.g. for axial
// gradients.
@@ -222,7 +222,7 @@ namespace vclcanvas
double fAlpha;
boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(double(i)/nStepCount);
- rOutDev.SetFillColor(
+ rOutDev.SetFillColor(
Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
(UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
(UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
@@ -237,18 +237,18 @@ namespace vclcanvas
// increased by one, to account for the fact that we
// calculate the right border here (whereas the fill
// color is governed by the left edge)
- const ::basegfx::B2DPoint& rPoint3(
- (nStepCount - i-1)/double(nStepCount)*aLeftTop +
+ const ::basegfx::B2DPoint& rPoint3(
+ (nStepCount - i-1)/double(nStepCount)*aLeftTop +
(i+1)/double(nStepCount)*aRightTop );
aTempPoly[1] = ::Point( ::basegfx::fround( rPoint3.getX() ),
::basegfx::fround( rPoint3.getY() ) );
- const ::basegfx::B2DPoint& rPoint4(
- (nStepCount - i-1)/double(nStepCount)*aLeftBottom +
+ const ::basegfx::B2DPoint& rPoint4(
+ (nStepCount - i-1)/double(nStepCount)*aLeftBottom +
(i+1)/double(nStepCount)*aRightBottom );
aTempPoly[2] = ::Point( ::basegfx::fround( rPoint4.getX() ),
::basegfx::fround( rPoint4.getY() ) );
-
+
rOutDev.DrawPolygon( aTempPoly );
}
@@ -294,8 +294,8 @@ namespace vclcanvas
// here, keep it all the way and only change the vertex values
// in the loop below (as ::Polygon is a pimpl class, creating
// one every loop turn would really stress the mem allocator)
- ::basegfx::B2DPolygon aOuterPoly( rGradientPoly );
- ::basegfx::B2DPolygon aInnerPoly;
+ ::basegfx::B2DPolygon aOuterPoly( rGradientPoly );
+ ::basegfx::B2DPolygon aInnerPoly;
// subdivide polygon _before_ rendering, would otherwise have
// to be performed on every loop turn.
@@ -303,7 +303,7 @@ namespace vclcanvas
aOuterPoly = ::basegfx::tools::adaptiveSubdivideByAngle(aOuterPoly);
aInnerPoly = aOuterPoly;
-
+
// only transform outer polygon _after_ copying it into
// aInnerPoly, because inner polygon has to be scaled before
// the actual texture transformation takes place
@@ -313,7 +313,7 @@ namespace vclcanvas
// have to be prefixed by anisotrophic scaling)
::basegfx::B2DHomMatrix aInnerPolygonTransformMatrix;
-
+
// apply scaling (possibly anisotrophic) to inner polygon
// ------------------------------------------------------
@@ -332,7 +332,7 @@ namespace vclcanvas
else if( nAspectRatio < 1.0 )
{
// width < height case
- aInnerPolygonTransformMatrix.scale( 0.0,
+ aInnerPolygonTransformMatrix.scale( 0.0,
1.0 - nAspectRatio );
}
else
@@ -346,11 +346,11 @@ namespace vclcanvas
// apply final matrix to polygon
aInnerPoly.transform( aInnerPolygonTransformMatrix );
-
+
const sal_uInt32 nNumPoints( aOuterPoly.count() );
- ::Polygon aTempPoly( static_cast<USHORT>(nNumPoints+1) );
-
+ ::Polygon aTempPoly( static_cast<USHORT>(nNumPoints+1) );
+
// increase number of steps by one: polygonal gradients have
// the outermost polygon rendered in rColor2, and the
// innermost in rColor1. The innermost polygon will never
@@ -360,7 +360,7 @@ namespace vclcanvas
// | |
// |-------|-------|-------|
// | |
- // 3 2 1 0
+ // 3 2 1 0
//
// This yields 4 tick marks, where 0 is never attained (since
// zero-area polygons typically don't display perceivable
@@ -380,27 +380,27 @@ namespace vclcanvas
for( unsigned int i=1,p; i<nStepCount; ++i )
{
- const double fT( i/double(nStepCount) );
+ const double fT( i/double(nStepCount) );
std::ptrdiff_t nIndex;
double fAlpha;
boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(fT);
// lerp color
- rOutDev.SetFillColor(
+ rOutDev.SetFillColor(
Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
(UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
(UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
// scale and render polygon, by interpolating between
- // outer and inner polygon.
+ // outer and inner polygon.
for( p=0; p<nNumPoints; ++p )
{
const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
- aTempPoly[(USHORT)p] = ::Point(
+ aTempPoly[(USHORT)p] = ::Point(
basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
}
@@ -424,8 +424,8 @@ namespace vclcanvas
// here, keep it all the way and only change the vertex values
// in the loop below (as ::Polygon is a pimpl class, creating
// one every loop turn would really stress the mem allocator)
- ::PolyPolygon aTempPolyPoly;
- ::Polygon aTempPoly2( static_cast<USHORT>(nNumPoints+1) );
+ ::PolyPolygon aTempPolyPoly;
+ ::Polygon aTempPoly2( static_cast<USHORT>(nNumPoints+1) );
aTempPoly2[0] = rBounds.TopLeft();
aTempPoly2[1] = rBounds.TopRight();
@@ -439,18 +439,18 @@ namespace vclcanvas
for( unsigned int i=0,p; i<nStepCount; ++i )
{
const double fT( (i+1)/double(nStepCount) );
-
+
std::ptrdiff_t nIndex;
double fAlpha;
boost::tuples::tie(nIndex,fAlpha)=aLerper.lerp(fT);
// lerp color
- rOutDev.SetFillColor(
+ rOutDev.SetFillColor(
Color( (UINT8)(basegfx::tools::lerp(rColors[nIndex].GetRed(),rColors[nIndex+1].GetRed(),fAlpha)),
(UINT8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)),
(UINT8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) ));
-#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
+#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
if( i && !(i % 10) )
rOutDev.SetFillColor( COL_RED );
#endif
@@ -464,7 +464,7 @@ namespace vclcanvas
const ::basegfx::B2DPoint& rOuterPoint( aOuterPoly.getB2DPoint(p) );
const ::basegfx::B2DPoint& rInnerPoint( aInnerPoly.getB2DPoint(p) );
- aTempPoly[(USHORT)p] = ::Point(
+ aTempPoly[(USHORT)p] = ::Point(
basegfx::fround( fT*rInnerPoint.getX() + (1-fT)*rOuterPoint.getX() ),
basegfx::fround( fT*rInnerPoint.getY() + (1-fT)*rOuterPoint.getY() ) );
}
@@ -498,7 +498,7 @@ namespace vclcanvas
}
void doGradientFill( OutputDevice& rOutDev,
- const ::canvas::ParametricPolyPolygon::Values& rValues,
+ const ::canvas::ParametricPolyPolygon::Values& rValues,
const std::vector< ::Color >& rColors,
const ::basegfx::B2DHomMatrix& rTextureTransform,
const ::Rectangle& rBounds,
@@ -515,7 +515,7 @@ namespace vclcanvas
rValues,
rColors );
break;
-
+
case ::canvas::ParametricPolyPolygon::GRADIENT_ELLIPTICAL:
// FALLTHROUGH intended
case ::canvas::ParametricPolyPolygon::GRADIENT_RECTANGULAR:
@@ -536,9 +536,9 @@ namespace vclcanvas
int numColorSteps( const ::Color& rColor1, const ::Color& rColor2 )
{
- return ::std::max(
+ return ::std::max(
labs( rColor1.GetRed() - rColor2.GetRed() ),
- ::std::max(
+ ::std::max(
labs( rColor1.GetGreen() - rColor2.GetGreen() ),
labs( rColor1.GetBlue() - rColor2.GetBlue() ) ) );
}
@@ -548,7 +548,7 @@ namespace vclcanvas
const ::canvas::ParametricPolyPolygon::Values& rValues,
const std::vector< ::Color >& rColors,
const PolyPolygon& rPoly,
- const rendering::ViewState& viewState,
+ const rendering::ViewState& viewState,
const rendering::RenderState& renderState,
const rendering::Texture& texture,
int nTransparency )
@@ -574,11 +574,11 @@ namespace vclcanvas
texture,
nColorSteps);
- rOutDev.SetLineColor();
+ rOutDev.SetLineColor();
// determine maximal bound rect of texture-filled
// polygon
- const ::Rectangle aPolygonDeviceRectOrig(
+ const ::Rectangle aPolygonDeviceRectOrig(
rPoly.GetBoundRect() );
if( tools::isRectangle( rPoly ) )
@@ -701,20 +701,20 @@ namespace vclcanvas
}
#endif // complex-clipping vs. XOR-trick
-#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
+#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
{
::basegfx::B2DRectangle aRect(0.0, 0.0, 1.0, 1.0);
::basegfx::B2DRectangle aTextureDeviceRect;
::basegfx::B2DHomMatrix aTextureTransform;
- ::canvas::tools::calcTransformedRectBounds( aTextureDeviceRect,
- aRect,
+ ::canvas::tools::calcTransformedRectBounds( aTextureDeviceRect,
+ aRect,
aTextureTransform );
- rOutDev.SetLineColor( COL_RED );
+ rOutDev.SetLineColor( COL_RED );
rOutDev.SetFillColor();
rOutDev.DrawRect( ::vcl::unotools::rectangleFromB2DRectangle( aTextureDeviceRect ) );
- rOutDev.SetLineColor( COL_BLUE );
- ::Polygon aPoly1(
+ rOutDev.SetLineColor( COL_BLUE );
+ ::Polygon aPoly1(
::vcl::unotools::rectangleFromB2DRectangle( aRect ));
::basegfx::B2DPolygon aPoly2( aPoly1.getB2DPolygon() );
aPoly2.transform( aTextureTransform );
@@ -727,15 +727,15 @@ namespace vclcanvas
}
}
- uno::Reference< rendering::XCachedPrimitive > CanvasHelper::fillTexturedPolyPolygon( const rendering::XCanvas* pCanvas,
+ uno::Reference< rendering::XCachedPrimitive > CanvasHelper::fillTexturedPolyPolygon( const rendering::XCanvas* pCanvas,
const uno::Reference< rendering::XPolyPolygon2D >& xPolyPolygon,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState,
- const uno::Sequence< rendering::Texture >& textures )
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState,
+ const uno::Sequence< rendering::Texture >& textures )
{
ENSURE_ARG_OR_THROW( xPolyPolygon.is(),
"CanvasHelper::fillPolyPolygon(): polygon is NULL");
- ENSURE_ARG_OR_THROW( textures.getLength(),
+ ENSURE_ARG_OR_THROW( textures.getLength(),
"CanvasHelper::fillTexturedPolyPolygon: empty texture sequence");
if( mpOutDev )
@@ -743,7 +743,7 @@ namespace vclcanvas
tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev );
const int nTransparency( setupOutDevState( viewState, renderState, IGNORE_COLOR ) );
- PolyPolygon aPolyPoly( tools::mapPolyPolygon(
+ PolyPolygon aPolyPoly( tools::mapPolyPolygon(
::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(xPolyPolygon),
viewState, renderState ) );
@@ -752,7 +752,7 @@ namespace vclcanvas
{
// try to cast XParametricPolyPolygon2D reference to
// our implementation class.
- ::canvas::ParametricPolyPolygon* pGradient =
+ ::canvas::ParametricPolyPolygon* pGradient =
dynamic_cast< ::canvas::ParametricPolyPolygon* >( textures[0].Gradient.get() );
if( pGradient && pGradient->getValues().maColors.getLength() )
@@ -801,14 +801,14 @@ namespace vclcanvas
else if( textures[0].Bitmap.is() )
{
const geometry::IntegerSize2D aBmpSize( textures[0].Bitmap->getSize() );
-
+
ENSURE_ARG_OR_THROW( aBmpSize.Width != 0 &&
aBmpSize.Height != 0,
"CanvasHelper::fillTexturedPolyPolygon(): zero-sized texture bitmap" );
// determine maximal bound rect of texture-filled
// polygon
- const ::Rectangle aPolygonDeviceRect(
+ const ::Rectangle aPolygonDeviceRect(
aPolyPoly.GetBoundRect() );
@@ -823,18 +823,18 @@ namespace vclcanvas
viewState,
renderState);
::basegfx::B2DHomMatrix aTextureTransform;
- ::basegfx::unotools::homMatrixFromAffineMatrix( aTextureTransform,
+ ::basegfx::unotools::homMatrixFromAffineMatrix( aTextureTransform,
textures[0].AffineTransform );
-
+
aTotalTransform *= aTextureTransform;
const ::basegfx::B2DRectangle aRect(0.0, 0.0, 1.0, 1.0);
::basegfx::B2DRectangle aTextureDeviceRect;
- ::canvas::tools::calcTransformedRectBounds( aTextureDeviceRect,
- aRect,
+ ::canvas::tools::calcTransformedRectBounds( aTextureDeviceRect,
+ aRect,
aTotalTransform );
- const ::Rectangle aIntegerTextureDeviceRect(
+ const ::Rectangle aIntegerTextureDeviceRect(
::vcl::unotools::rectangleFromB2DRectangle( aTextureDeviceRect ) );
if( bRectangularPolygon &&
@@ -861,14 +861,14 @@ namespace vclcanvas
pColor[2] = 0.0;
pColor[3] = textures[0].Alpha;
- return drawBitmapModulated( pCanvas,
+ return drawBitmapModulated( pCanvas,
textures[0].Bitmap,
viewState,
aLocalState );
}
else
{
- return drawBitmap( pCanvas,
+ return drawBitmap( pCanvas,
textures[0].Bitmap,
viewState,
aLocalState );
@@ -895,7 +895,7 @@ namespace vclcanvas
// combine with view and render transform
::basegfx::B2DHomMatrix aMatrix;
::canvas::tools::mergeViewAndRenderTransform(aMatrix, viewState, renderState);
-
+
// combine all three transformations into one
// global texture-to-device-space transformation
aTotalTransform *= aMatrix;
@@ -905,12 +905,12 @@ namespace vclcanvas
// appropriate GraphicObject
::basegfx::B2DVector aScale;
::basegfx::B2DPoint aOutputPos;
- double nRotate;
- double nShearX;
+ double nRotate;
+ double nShearX;
aTotalTransform.decompose( aScale, aOutputPos, nRotate, nShearX );
-
- GraphicAttr aGrfAttr;
- GraphicObjectSharedPtr pGrfObj;
+
+ GraphicAttr aGrfAttr;
+ GraphicObjectSharedPtr pGrfObj;
if( ::basegfx::fTools::equalZero( nShearX ) )
{
@@ -919,8 +919,8 @@ namespace vclcanvas
// and translation)
// setup GraphicAttr
- aGrfAttr.SetMirrorFlags(
- ( aScale.getX() < 0.0 ? BMP_MIRROR_HORZ : 0 ) |
+ aGrfAttr.SetMirrorFlags(
+ ( aScale.getX() < 0.0 ? BMP_MIRROR_HORZ : 0 ) |
( aScale.getY() < 0.0 ? BMP_MIRROR_VERT : 0 ) );
aGrfAttr.SetRotation( static_cast< USHORT >(::basegfx::fround( nRotate*10.0 )) );
@@ -978,9 +978,9 @@ namespace vclcanvas
// device coordinate space, were we determine the
// start point from it.
::basegfx::B2DRectangle aTextureSpacePolygonRect;
- ::canvas::tools::calcTransformedRectBounds( aTextureSpacePolygonRect,
+ ::canvas::tools::calcTransformedRectBounds( aTextureSpacePolygonRect,
::vcl::unotools::b2DRectangleFromRectangle(
- aPolygonDeviceRect ),
+ aPolygonDeviceRect ),
aInverseTextureTransform );
// calc left, top of extended polygon rect in
@@ -1003,26 +1003,26 @@ namespace vclcanvas
// and convert back to device space
::basegfx::B2DRectangle aSingleDeviceTextureRect;
- ::canvas::tools::calcTransformedRectBounds( aSingleDeviceTextureRect,
- aSingleTextureRect,
+ ::canvas::tools::calcTransformedRectBounds( aSingleDeviceTextureRect,
+ aSingleTextureRect,
aPureTotalTransform );
-
- const ::Point aPtRepeat( ::vcl::unotools::pointFromB2DPoint(
+
+ const ::Point aPtRepeat( ::vcl::unotools::pointFromB2DPoint(
aSingleDeviceTextureRect.getMinimum() ) );
const ::Size aSz( ::basegfx::fround( aScale.getX() * aBmpSize.Width ),
::basegfx::fround( aScale.getY() * aBmpSize.Height ) );
const ::Size aIntegerNextTileX( ::vcl::unotools::sizeFromB2DSize(aNextTileX) );
const ::Size aIntegerNextTileY( ::vcl::unotools::sizeFromB2DSize(aNextTileY) );
- const ::Point aPt( textures[0].RepeatModeX == rendering::TexturingMode::NONE ?
+ const ::Point aPt( textures[0].RepeatModeX == rendering::TexturingMode::NONE ?
::basegfx::fround( aOutputPos.getX() ) : aPtRepeat.X(),
- textures[0].RepeatModeY == rendering::TexturingMode::NONE ?
+ textures[0].RepeatModeY == rendering::TexturingMode::NONE ?
::basegfx::fround( aOutputPos.getY() ) : aPtRepeat.Y() );
- const sal_Int32 nTilesX( textures[0].RepeatModeX == rendering::TexturingMode::NONE ?
+ const sal_Int32 nTilesX( textures[0].RepeatModeX == rendering::TexturingMode::NONE ?
1 : nX2 - nX1 );
- const sal_Int32 nTilesY( textures[0].RepeatModeX == rendering::TexturingMode::NONE ?
+ const sal_Int32 nTilesY( textures[0].RepeatModeX == rendering::TexturingMode::NONE ?
1 : nY2 - nY1 );
-
+
OutputDevice& rOutDev( mpOutDev->getOutDev() );
if( bRectangularPolygon )
@@ -1050,8 +1050,8 @@ namespace vclcanvas
// transOrig*transModulate (which would be
// equivalent to the origAlpha*modulateAlpha
// the DX canvas performs)
- aGrfAttr.SetTransparency(
- static_cast< BYTE >(
+ aGrfAttr.SetTransparency(
+ static_cast< BYTE >(
::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) );
}
@@ -1118,11 +1118,11 @@ namespace vclcanvas
// output VDev content alpha-blended to
// target position.
const ::Point aEmptyPoint;
- Bitmap aContentBmp(
- aVDev.GetBitmap( aEmptyPoint,
+ Bitmap aContentBmp(
+ aVDev.GetBitmap( aEmptyPoint,
aVDev.GetOutputSizePixel() ) );
- BYTE nCol( static_cast< BYTE >(
+ BYTE nCol( static_cast< BYTE >(
::basegfx::fround( 255.0*( 1.0 - textures[0].Alpha ) ) ) );
AlphaMask aAlpha( aVDev.GetOutputSizePixel(),
&nCol );
diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx
index 02c4e547be76..3994517d74e4 100644
--- a/canvas/source/vcl/devicehelper.cxx
+++ b/canvas/source/vcl/devicehelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -88,15 +88,15 @@ namespace vclcanvas
return ::vcl::unotools::size2DFromSize( aLogSize );
}
- uno::Reference< rendering::XLinePolyPolygon2D > DeviceHelper::createCompatibleLinePolyPolygon(
- const uno::Reference< rendering::XGraphicDevice >& ,
- const uno::Sequence< uno::Sequence< geometry::RealPoint2D > >& points )
+ uno::Reference< rendering::XLinePolyPolygon2D > DeviceHelper::createCompatibleLinePolyPolygon(
+ const uno::Reference< rendering::XGraphicDevice >& ,
+ const uno::Sequence< uno::Sequence< geometry::RealPoint2D > >& points )
{
uno::Reference< rendering::XLinePolyPolygon2D > xPoly;
if( !mpOutDev )
return xPoly; // we're disposed
- xPoly.set( new ::basegfx::unotools::UnoPolyPolygon(
+ xPoly.set( new ::basegfx::unotools::UnoPolyPolygon(
::basegfx::unotools::polyPolygonFromPoint2DSequenceSequence( points ) ) );
// vcl only handles even_odd polygons
xPoly->setFillRule(rendering::FillRule_EVEN_ODD);
@@ -104,15 +104,15 @@ namespace vclcanvas
return xPoly;
}
- uno::Reference< rendering::XBezierPolyPolygon2D > DeviceHelper::createCompatibleBezierPolyPolygon(
- const uno::Reference< rendering::XGraphicDevice >& ,
- const uno::Sequence< uno::Sequence< geometry::RealBezierSegment2D > >& points )
+ uno::Reference< rendering::XBezierPolyPolygon2D > DeviceHelper::createCompatibleBezierPolyPolygon(
+ const uno::Reference< rendering::XGraphicDevice >& ,
+ const uno::Sequence< uno::Sequence< geometry::RealBezierSegment2D > >& points )
{
uno::Reference< rendering::XBezierPolyPolygon2D > xPoly;
if( !mpOutDev )
return xPoly; // we're disposed
- xPoly.set( new ::basegfx::unotools::UnoPolyPolygon(
+ xPoly.set( new ::basegfx::unotools::UnoPolyPolygon(
::basegfx::unotools::polyPolygonFromBezier2DSequenceSequence( points ) ) );
// vcl only handles even_odd polygons
xPoly->setFillRule(rendering::FillRule_EVEN_ODD);
@@ -120,44 +120,44 @@ namespace vclcanvas
return xPoly;
}
- uno::Reference< rendering::XBitmap > DeviceHelper::createCompatibleBitmap(
+ uno::Reference< rendering::XBitmap > DeviceHelper::createCompatibleBitmap(
const uno::Reference< rendering::XGraphicDevice >& rDevice,
- const geometry::IntegerSize2D& size )
+ const geometry::IntegerSize2D& size )
{
if( !mpOutDev )
return uno::Reference< rendering::XBitmap >(); // we're disposed
- return uno::Reference< rendering::XBitmap >(
+ return uno::Reference< rendering::XBitmap >(
new CanvasBitmap( ::vcl::unotools::sizeFromIntegerSize2D(size),
false,
*rDevice.get(),
mpOutDev ) );
}
- uno::Reference< rendering::XVolatileBitmap > DeviceHelper::createVolatileBitmap(
- const uno::Reference< rendering::XGraphicDevice >& ,
- const geometry::IntegerSize2D& )
+ uno::Reference< rendering::XVolatileBitmap > DeviceHelper::createVolatileBitmap(
+ const uno::Reference< rendering::XGraphicDevice >& ,
+ const geometry::IntegerSize2D& )
{
return uno::Reference< rendering::XVolatileBitmap >();
}
- uno::Reference< rendering::XBitmap > DeviceHelper::createCompatibleAlphaBitmap(
+ uno::Reference< rendering::XBitmap > DeviceHelper::createCompatibleAlphaBitmap(
const uno::Reference< rendering::XGraphicDevice >& rDevice,
const geometry::IntegerSize2D& size )
{
if( !mpOutDev )
return uno::Reference< rendering::XBitmap >(); // we're disposed
- return uno::Reference< rendering::XBitmap >(
+ return uno::Reference< rendering::XBitmap >(
new CanvasBitmap( ::vcl::unotools::sizeFromIntegerSize2D(size),
true,
*rDevice.get(),
mpOutDev ) );
}
- uno::Reference< rendering::XVolatileBitmap > DeviceHelper::createVolatileAlphaBitmap(
- const uno::Reference< rendering::XGraphicDevice >& ,
- const geometry::IntegerSize2D& )
+ uno::Reference< rendering::XVolatileBitmap > DeviceHelper::createVolatileAlphaBitmap(
+ const uno::Reference< rendering::XGraphicDevice >& ,
+ const geometry::IntegerSize2D& )
{
return uno::Reference< rendering::XVolatileBitmap >();
}
@@ -172,44 +172,44 @@ namespace vclcanvas
(void)bEnter;
return false;
}
-
+
void DeviceHelper::disposing()
{
// release all references
mpOutDev.reset();
}
-
+
uno::Any DeviceHelper::isAccelerated() const
{
return ::com::sun::star::uno::makeAny(false);
}
-
+
uno::Any DeviceHelper::getDeviceHandle() const
{
if( !mpOutDev )
return uno::Any();
-
- return uno::makeAny(
+
+ return uno::makeAny(
reinterpret_cast< sal_Int64 >(&mpOutDev->getOutDev()) );
}
-
+
uno::Any DeviceHelper::getSurfaceHandle() const
{
return getDeviceHandle();
}
-
- namespace
- {
+
+ namespace
+ {
struct DeviceColorSpace: public rtl::StaticWithInit<uno::Reference<rendering::XColorSpace>,
- DeviceColorSpace>
+ DeviceColorSpace>
{
uno::Reference<rendering::XColorSpace> operator()()
{
return vcl::unotools::createStandardColorSpace();
}
- };
+ };
}
-
+
uno::Reference<rendering::XColorSpace> DeviceHelper::getColorSpace() const
{
// always the same
@@ -239,7 +239,7 @@ namespace vclcanvas
++nFilePostfixCount;
}
}
-
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/devicehelper.hxx b/canvas/source/vcl/devicehelper.hxx
index 1c2d7b930320..025e974d24e6 100644
--- a/canvas/source/vcl/devicehelper.hxx
+++ b/canvas/source/vcl/devicehelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,31 +61,31 @@ namespace vclcanvas
// XWindowGraphicDevice
::com::sun::star::geometry::RealSize2D getPhysicalResolution();
::com::sun::star::geometry::RealSize2D getPhysicalSize();
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
- const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XLinePolyPolygon2D > createCompatibleLinePolyPolygon(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > >& points );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
- const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBezierPolyPolygon2D > createCompatibleBezierPolyPolygon(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealBezierSegment2D > >& points );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleBitmap(
- const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
- const ::com::sun::star::geometry::IntegerSize2D& size );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileBitmap(
- const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
- const ::com::sun::star::geometry::IntegerSize2D& size );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleAlphaBitmap(
- const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
- const ::com::sun::star::geometry::IntegerSize2D& size );
- ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
- const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
- const ::com::sun::star::geometry::IntegerSize2D& size );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleBitmap(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
+ const ::com::sun::star::geometry::IntegerSize2D& size );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileBitmap(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
+ const ::com::sun::star::geometry::IntegerSize2D& size );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmap > createCompatibleAlphaBitmap(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
+ const ::com::sun::star::geometry::IntegerSize2D& size );
+ ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XVolatileBitmap > createVolatileAlphaBitmap(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& rDevice,
+ const ::com::sun::star::geometry::IntegerSize2D& size );
sal_Bool hasFullScreenMode( );
sal_Bool enterFullScreenMode( sal_Bool bEnter );
::com::sun::star::uno::Any isAccelerated() const;
::com::sun::star::uno::Any getDeviceHandle() const;
::com::sun::star::uno::Any getSurfaceHandle() const;
- ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XColorSpace > getColorSpace() const;
OutDevProviderSharedPtr getOutDev() const { return mpOutDev; }
@@ -97,7 +97,7 @@ namespace vclcanvas
private:
/// For retrieving device info
- OutDevProviderSharedPtr mpOutDev;
+ OutDevProviderSharedPtr mpOutDev;
};
}
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index 1b6829784ab3..86d82098ef32 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -96,7 +96,7 @@ namespace vclcanvas
}
// TODO(F2): add support for floating point bitmap formats
- uno::Reference< rendering::XIntegerReadOnlyBitmap > xIntBmp(
+ uno::Reference< rendering::XIntegerReadOnlyBitmap > xIntBmp(
xBitmap, uno::UNO_QUERY_THROW );
::BitmapEx aBmpEx = ::vcl::unotools::bitmapExFromXBitmap( xIntBmp );
@@ -104,21 +104,21 @@ namespace vclcanvas
return aBmpEx;
// TODO(F1): extract pixel from XBitmap interface
- ENSURE_OR_THROW( false,
+ ENSURE_OR_THROW( false,
"bitmapExFromXBitmap(): could not extract bitmap" );
}
-
+
return ::BitmapEx();
}
- bool setupFontTransform( ::Point& o_rPoint,
- ::Font& io_rVCLFont,
- const rendering::ViewState& rViewState,
- const rendering::RenderState& rRenderState,
- ::OutputDevice& rOutDev )
+ bool setupFontTransform( ::Point& o_rPoint,
+ ::Font& io_rVCLFont,
+ const rendering::ViewState& rViewState,
+ const rendering::RenderState& rRenderState,
+ ::OutputDevice& rOutDev )
{
::basegfx::B2DHomMatrix aMatrix;
-
+
::canvas::tools::mergeViewAndRenderTransform(aMatrix,
rViewState,
rRenderState);
@@ -126,12 +126,12 @@ namespace vclcanvas
::basegfx::B2DTuple aScale;
::basegfx::B2DTuple aTranslate;
double nRotate, nShearX;
-
+
aMatrix.decompose( aScale, aTranslate, nRotate, nShearX );
// #i72417# detecting the 180 degree rotation case manually here.
- if( aScale.getX() < 0.0 &&
- aScale.getY() < 0.0 &&
+ if( aScale.getX() < 0.0 &&
+ aScale.getY() < 0.0 &&
basegfx::fTools::equalZero(nRotate) )
{
aScale *= -1.0;
@@ -191,9 +191,9 @@ namespace vclcanvas
// VCL-Canvas related
//---------------------------------------------------------------------
- ::Point mapRealPoint2D( const geometry::RealPoint2D& rPoint,
- const rendering::ViewState& rViewState,
- const rendering::RenderState& rRenderState )
+ ::Point mapRealPoint2D( const geometry::RealPoint2D& rPoint,
+ const rendering::ViewState& rViewState,
+ const rendering::RenderState& rRenderState )
{
::basegfx::B2DPoint aPoint( ::basegfx::unotools::b2DPointFromRealPoint2D(rPoint) );
@@ -205,9 +205,9 @@ namespace vclcanvas
return ::vcl::unotools::pointFromB2DPoint( aPoint );
}
- ::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
- const rendering::ViewState& rViewState,
- const rendering::RenderState& rRenderState )
+ ::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
+ const rendering::ViewState& rViewState,
+ const rendering::RenderState& rRenderState )
{
::basegfx::B2DHomMatrix aMatrix;
::canvas::tools::mergeViewAndRenderTransform(aMatrix,
@@ -221,28 +221,28 @@ namespace vclcanvas
return ::PolyPolygon( aTemp );
}
- ::BitmapEx transformBitmap( const BitmapEx& rBitmap,
- const ::basegfx::B2DHomMatrix& rTransform,
- const uno::Sequence< double >& rDeviceColor,
- ModulationMode eModulationMode )
+ ::BitmapEx transformBitmap( const BitmapEx& rBitmap,
+ const ::basegfx::B2DHomMatrix& rTransform,
+ const uno::Sequence< double >& rDeviceColor,
+ ModulationMode eModulationMode )
{
RTL_LOGFILE_CONTEXT( aLog, "::vclcanvas::tools::transformBitmap()" );
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "::vclcanvas::tools::transformBitmap: 0x%X", &rBitmap );
-
+
// calc transformation and size of bitmap to be
// generated. Note, that the translational components are
// deleted from the transformation; this can be handled by
// an offset when painting the bitmap
- const Size aBmpSize( rBitmap.GetSizePixel() );
- ::basegfx::B2DRectangle aDestRect;
-
+ const Size aBmpSize( rBitmap.GetSizePixel() );
+ ::basegfx::B2DRectangle aDestRect;
+
bool bCopyBack( false );
// calc effective transformation for bitmap
const ::basegfx::B2DRectangle aSrcRect( 0, 0,
aBmpSize.Width(),
aBmpSize.Height() );
- ::canvas::tools::calcTransformedRectBounds( aDestRect,
+ ::canvas::tools::calcTransformedRectBounds( aDestRect,
aSrcRect,
rTransform );
@@ -260,7 +260,7 @@ namespace vclcanvas
const double nRedModulation( bModulateColors ? rDeviceColor[0] : 1.0 );
const double nGreenModulation( bModulateColors ? rDeviceColor[1] : 1.0 );
const double nBlueModulation( bModulateColors ? rDeviceColor[2] : 1.0 );
- const double nAlphaModulation( bModulateColors && rDeviceColor.getLength() > 3 ?
+ const double nAlphaModulation( bModulateColors && rDeviceColor.getLength() > 3 ?
rDeviceColor[3] : 1.0 );
Bitmap aSrcBitmap( rBitmap.GetBitmap() );
@@ -278,8 +278,8 @@ namespace vclcanvas
ScopedBitmapReadAccess pReadAccess( aSrcBitmap.AcquireReadAccess(),
aSrcBitmap );
- ScopedBitmapReadAccess pAlphaReadAccess( rBitmap.IsTransparent() ?
- aSrcAlpha.AcquireReadAccess() :
+ ScopedBitmapReadAccess pAlphaReadAccess( rBitmap.IsTransparent() ?
+ aSrcAlpha.AcquireReadAccess() :
(BitmapReadAccess*)NULL,
aSrcAlpha );
@@ -287,7 +287,7 @@ namespace vclcanvas
(pAlphaReadAccess.get() == NULL && rBitmap.IsTransparent()) )
{
// TODO(E2): Error handling!
- ENSURE_OR_THROW( false,
+ ENSURE_OR_THROW( false,
"transformBitmap(): could not access source bitmap" );
}
@@ -318,7 +318,7 @@ namespace vclcanvas
}
// else: mapping table is not used
- const Size aDestBmpSize( ::basegfx::fround( aDestRect.getWidth() ),
+ const Size aDestBmpSize( ::basegfx::fround( aDestRect.getWidth() ),
::basegfx::fround( aDestRect.getHeight() ) );
if( aDestBmpSize.Width() == 0 || aDestBmpSize.Height() == 0 )
@@ -338,7 +338,7 @@ namespace vclcanvas
ScopedBitmapWriteAccess pAlphaWriteAccess( aDstAlpha.AcquireWriteAccess(),
aDstAlpha );
-
+
if( pWriteAccess.get() != NULL &&
pAlphaWriteAccess.get() != NULL &&
rTransform.isInvertible() )
@@ -348,8 +348,8 @@ namespace vclcanvas
// source
::basegfx::B2DHomMatrix aTransform( aLocalTransform );
aTransform.invert();
-
- // for the time being, always read as ARGB
+
+ // for the time being, always read as ARGB
for( int y=0; y<aDestBmpSize.Height(); ++y )
{
if( bModulateColors )
@@ -384,36 +384,36 @@ namespace vclcanvas
// nAlphaModulation. This is a
// little bit verbose, formula
// is 255 - (255-pixAlpha)*nAlphaModulation
- // (invert 'alpha' pixel value,
- // to get the standard alpha
+ // (invert 'alpha' pixel value,
+ // to get the standard alpha
// channel behaviour)
- pAlphaWriteAccess->SetPixel( y, x,
- BitmapColor(
- 255U -
+ pAlphaWriteAccess->SetPixel( y, x,
+ BitmapColor(
+ 255U -
static_cast<BYTE>(
nAlphaModulation*
(255U
- - aAlphaMap[ pAlphaReadAccess->GetPixel(
+ - aAlphaMap[ pAlphaReadAccess->GetPixel(
nSrcY,
nSrcX ).GetIndex() ] ) + .5 ) ) );
BitmapColor aColor( pReadAccess->GetPixel( nSrcY,
nSrcX ) );
- aColor.SetRed(
+ aColor.SetRed(
static_cast<BYTE>(
nRedModulation *
aColor.GetRed() + .5 ));
- aColor.SetGreen(
+ aColor.SetGreen(
static_cast<BYTE>(
nGreenModulation *
aColor.GetGreen() + .5 ));
- aColor.SetBlue(
+ aColor.SetBlue(
static_cast<BYTE>(
nBlueModulation *
aColor.GetBlue() + .5 ));
- pWriteAccess->SetPixel( y, x,
+ pWriteAccess->SetPixel( y, x,
aColor );
}
}
@@ -438,12 +438,12 @@ namespace vclcanvas
// nAlphaModulation. This is a
// little bit verbose, formula
// is 255 - 255*nAlphaModulation
- // (invert 'alpha' pixel value,
- // to get the standard alpha
+ // (invert 'alpha' pixel value,
+ // to get the standard alpha
// channel behaviour)
- pAlphaWriteAccess->SetPixel( y, x,
- BitmapColor(
- 255U -
+ pAlphaWriteAccess->SetPixel( y, x,
+ BitmapColor(
+ 255U -
static_cast<BYTE>(
nAlphaModulation*255.0
+ .5 ) ) );
@@ -451,20 +451,20 @@ namespace vclcanvas
BitmapColor aColor( pReadAccess->GetPixel( nSrcY,
nSrcX ) );
- aColor.SetRed(
+ aColor.SetRed(
static_cast<BYTE>(
nRedModulation *
aColor.GetRed() + .5 ));
- aColor.SetGreen(
+ aColor.SetGreen(
static_cast<BYTE>(
nGreenModulation *
aColor.GetGreen() + .5 ));
- aColor.SetBlue(
+ aColor.SetBlue(
static_cast<BYTE>(
nBlueModulation *
aColor.GetBlue() + .5 ));
- pWriteAccess->SetPixel( y, x,
+ pWriteAccess->SetPixel( y, x,
aColor );
}
}
@@ -491,8 +491,8 @@ namespace vclcanvas
}
else
{
- pAlphaWriteAccess->SetPixel( y, x,
- aAlphaMap[
+ pAlphaWriteAccess->SetPixel( y, x,
+ aAlphaMap[
pAlphaReadAccess->GetPixel( nSrcY,
nSrcX ) ] );
@@ -531,7 +531,7 @@ namespace vclcanvas
else
{
// TODO(E2): Error handling!
- ENSURE_OR_THROW( false,
+ ENSURE_OR_THROW( false,
"transformBitmap(): could not access bitmap" );
}
}
diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx
index 963162b22587..22ea4e2c07f9 100644
--- a/canvas/source/vcl/impltools.hxx
+++ b/canvas/source/vcl/impltools.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,7 +49,7 @@ class OutputDevice;
class Point;
class Size;
-namespace basegfx
+namespace basegfx
{
namespace matrix
{
@@ -65,26 +65,26 @@ namespace basegfx
}
}
-namespace com { namespace sun { namespace star { namespace awt
+namespace com { namespace sun { namespace star { namespace awt
{
struct Point;
struct Size;
struct Rectangle;
} } } }
-namespace com { namespace sun { namespace star { namespace drawing
+namespace com { namespace sun { namespace star { namespace drawing
{
struct HomogenMatrix3;
} } } }
-namespace com { namespace sun { namespace star { namespace geometry
+namespace com { namespace sun { namespace star { namespace geometry
{
struct RealPoint2D;
struct RealSize2D;
struct RealRectangle2D;
} } } }
-namespace com { namespace sun { namespace star { namespace rendering
+namespace com { namespace sun { namespace star { namespace rendering
{
struct RenderState;
struct ViewState;
@@ -99,18 +99,18 @@ namespace vclcanvas
namespace tools
{
::BitmapEx
- bitmapExFromXBitmap( const ::com::sun::star::uno::Reference<
+ bitmapExFromXBitmap( const ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XBitmap >& );
/** Setup VCL font and output position
@returns false, if no text output should happen
*/
- bool setupFontTransform( ::Point& o_rPoint,
- ::Font& io_rVCLFont,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState,
- ::OutputDevice& rOutDev );
+ bool setupFontTransform( ::Point& o_rPoint,
+ ::Font& io_rVCLFont,
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState,
+ ::OutputDevice& rOutDev );
/** Predicate, to determine whether polygon is actually an axis-aligned rectangle
@@ -154,7 +154,7 @@ namespace vclcanvas
{
init();
}
-
+
~OutDevStateKeeper()
{
if( mpOutDev )
@@ -174,17 +174,17 @@ namespace vclcanvas
}
}
- OutputDevice* mpOutDev;
- const bool mbMappingWasEnabled;
+ OutputDevice* mpOutDev;
+ const bool mbMappingWasEnabled;
};
- ::Point mapRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& rPoint,
- const ::com::sun::star::rendering::ViewState& rViewState,
- const ::com::sun::star::rendering::RenderState& rRenderState );
+ ::Point mapRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& rPoint,
+ const ::com::sun::star::rendering::ViewState& rViewState,
+ const ::com::sun::star::rendering::RenderState& rRenderState );
- ::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
- const ::com::sun::star::rendering::ViewState& rViewState,
- const ::com::sun::star::rendering::RenderState& rRenderState );
+ ::PolyPolygon mapPolyPolygon( const ::basegfx::B2DPolyPolygon& rPoly,
+ const ::com::sun::star::rendering::ViewState& rViewState,
+ const ::com::sun::star::rendering::RenderState& rRenderState );
enum ModulationMode
{
@@ -192,10 +192,10 @@ namespace vclcanvas
MODULATE_WITH_DEVICECOLOR
};
- ::BitmapEx transformBitmap( const BitmapEx& rBitmap,
- const ::basegfx::B2DHomMatrix& rTransform,
- const ::com::sun::star::uno::Sequence< double >& rDeviceColor,
- ModulationMode eModulationMode );
+ ::BitmapEx transformBitmap( const BitmapEx& rBitmap,
+ const ::basegfx::B2DHomMatrix& rTransform,
+ const ::com::sun::star::uno::Sequence< double >& rDeviceColor,
+ ModulationMode eModulationMode );
}
}
diff --git a/canvas/source/vcl/outdevprovider.hxx b/canvas/source/vcl/outdevprovider.hxx
index 2d41980c8569..a49f16f5d945 100644
--- a/canvas/source/vcl/outdevprovider.hxx
+++ b/canvas/source/vcl/outdevprovider.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,7 +39,7 @@ namespace vclcanvas
{
/* Definition of OutDevProvider interface */
- /** Implementers of this interface provide the CanvasHelper
+ /** Implementers of this interface provide the CanvasHelper
with its OutputDevice.
This additional level of indirection was necessary, as the
@@ -52,7 +52,7 @@ namespace vclcanvas
public:
virtual ~OutDevProvider() {}
- virtual OutputDevice& getOutDev() = 0;
+ virtual OutputDevice& getOutDev() = 0;
virtual const OutputDevice& getOutDev() const = 0;
};
diff --git a/canvas/source/vcl/repainttarget.hxx b/canvas/source/vcl/repainttarget.hxx
index 5ca0c4dea198..fb90d9e70197 100644
--- a/canvas/source/vcl/repainttarget.hxx
+++ b/canvas/source/vcl/repainttarget.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@ class GraphicAttr;
namespace vclcanvas
{
/* Definition of RepaintTarget interface */
-
+
/** Target interface for XCachedPrimitive implementations
This interface must be implemented on all canvas
@@ -55,7 +55,7 @@ namespace vclcanvas
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
- const ::Point& rPt,
+ const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const = 0;
};
diff --git a/canvas/source/vcl/services.cxx b/canvas/source/vcl/services.cxx
index f482c841ea74..fc79b5c5ea89 100644
--- a/canvas/source/vcl/services.cxx
+++ b/canvas/source/vcl/services.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/canvas/source/vcl/sprite.hxx b/canvas/source/vcl/sprite.hxx
index b2713eb4486d..72d108efaa28 100644
--- a/canvas/source/vcl/sprite.hxx
+++ b/canvas/source/vcl/sprite.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/canvas/source/vcl/spritecanvas.cxx b/canvas/source/vcl/spritecanvas.cxx
index b06bd1c77e9e..2e2e73560484 100644
--- a/canvas/source/vcl/spritecanvas.cxx
+++ b/canvas/source/vcl/spritecanvas.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,7 +65,7 @@ namespace vclcanvas
void SpriteCanvas::initialize()
{
SolarMutexGuard aGuard;
-
+
// #i64742# Only call initialize when not in probe mode
if( maArguments.getLength() == 0 )
return;
@@ -81,7 +81,7 @@ namespace vclcanvas
boost::bind(&SpriteCanvasHelper::enableUnsafeScrolling,
boost::ref(maCanvasHelper),
_1))
- ("SpriteBounds",
+ ("SpriteBounds",
boost::bind(&SpriteCanvasHelper::isSpriteBounds,
boost::ref(maCanvasHelper)),
boost::bind(&SpriteCanvasHelper::enableSpriteBounds,
@@ -90,7 +90,7 @@ namespace vclcanvas
VERBOSE_TRACE( "VCLSpriteCanvas::initialize called" );
- ENSURE_ARG_OR_THROW( maArguments.getLength() >= 1,
+ ENSURE_ARG_OR_THROW( maArguments.getLength() >= 1,
"VCLSpriteCanvas::initialize: wrong number of arguments" );
/* maArguments:
@@ -103,21 +103,21 @@ namespace vclcanvas
*/
ENSURE_ARG_OR_THROW( maArguments.getLength() >= 4 &&
maArguments[0].getValueTypeClass() == uno::TypeClass_HYPER &&
- maArguments[4].getValueTypeClass() == uno::TypeClass_INTERFACE,
+ maArguments[4].getValueTypeClass() == uno::TypeClass_INTERFACE,
"VCLSpriteCanvas::initialize: wrong number of arguments, or wrong types" );
-
+
uno::Reference< awt::XWindow > xParentWindow;
maArguments[4] >>= xParentWindow;
-
+
OutDevProviderSharedPtr pOutDev( new WindowOutDevHolder(xParentWindow) );
-
- // setup helper
+
+ // setup helper
maDeviceHelper.init( pOutDev );
- setWindow(uno::Reference<awt::XWindow2>(xParentWindow, uno::UNO_QUERY_THROW));
+ setWindow(uno::Reference<awt::XWindow2>(xParentWindow, uno::UNO_QUERY_THROW));
maCanvasHelper.init( maDeviceHelper.getBackBuffer(),
*this,
maRedrawManager,
- false, // no OutDev state preservation
+ false, // no OutDev state preservation
false ); // no alpha on surface
maArguments.realloc(0);
@@ -152,7 +152,7 @@ namespace vclcanvas
sal_Bool SAL_CALL SpriteCanvas::updateScreen( sal_Bool bUpdateAll ) throw (uno::RuntimeException)
{
SolarMutexGuard aGuard;
-
+
// avoid repaints on hidden window (hidden: not mapped to
// screen). Return failure, since the screen really has _not_
// been updated (caller should try again later)
@@ -165,12 +165,12 @@ namespace vclcanvas
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SPRITECANVAS_SERVICE_NAME ) );
}
- bool SpriteCanvas::repaint( const GraphicObjectSharedPtr& rGrf,
+ bool SpriteCanvas::repaint( const GraphicObjectSharedPtr& rGrf,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState,
- const ::Point& rPt,
- const ::Size& rSz,
- const GraphicAttr& rAttr ) const
+ const ::Point& rPt,
+ const ::Size& rSz,
+ const GraphicAttr& rAttr ) const
{
SolarMutexGuard aGuard;
diff --git a/canvas/source/vcl/spritecanvas.hxx b/canvas/source/vcl/spritecanvas.hxx
index 15688fca0ee3..fcad1a171e2f 100644
--- a/canvas/source/vcl/spritecanvas.hxx
+++ b/canvas/source/vcl/spritecanvas.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -67,11 +67,11 @@ namespace vclcanvas
::com::sun::star::awt::XWindowListener,
::com::sun::star::util::XUpdatable,
::com::sun::star::beans::XPropertySet,
- ::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
+ ::com::sun::star::lang::XServiceName > WindowGraphicDeviceBase_Base;
typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::BaseMutexHelper< WindowGraphicDeviceBase_Base >,
- SpriteDeviceHelper,
+ SpriteDeviceHelper,
tools::LocalGuard,
- ::cppu::OWeakObject > SpriteCanvasBase_Base;
+ ::cppu::OWeakObject > SpriteCanvasBase_Base;
/** Mixin SpriteSurface
@@ -96,9 +96,9 @@ namespace vclcanvas
};
typedef ::canvas::SpriteCanvasBase< SpriteCanvasBaseSpriteSurface_Base,
- SpriteCanvasHelper,
+ SpriteCanvasHelper,
tools::LocalGuard,
- ::cppu::OWeakObject > SpriteCanvasBaseT;
+ ::cppu::OWeakObject > SpriteCanvasBaseT;
/** Product of this component's factory.
@@ -113,9 +113,9 @@ namespace vclcanvas
public RepaintTarget
{
public:
- SpriteCanvas( const ::com::sun::star::uno::Sequence<
+ SpriteCanvas( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& aArguments,
- const ::com::sun::star::uno::Reference<
+ const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext >& rxContext );
void initialize();
@@ -135,7 +135,7 @@ namespace vclcanvas
// Classname Base doing refcounting Base implementing the XComponent interface
// | | |
// V V V
- DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( SpriteCanvas, WindowGraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase );
+ DECLARE_UNO3_XCOMPONENT_AGG_DEFAULTS( SpriteCanvas, WindowGraphicDeviceBase_Base, ::cppu::WeakComponentImplHelperBase );
// XBufferController (partial)
virtual ::sal_Bool SAL_CALL showBuffer( ::sal_Bool bUpdateAll ) throw (::com::sun::star::uno::RuntimeException);
@@ -151,7 +151,7 @@ namespace vclcanvas
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState,
- const ::Point& rPt,
+ const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const;
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index 29c6725a70af..33fd5987de2c 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -64,24 +64,24 @@ namespace vclcanvas
*/
void spriteRedraw( OutputDevice& rOutDev,
const ::canvas::Sprite::Reference& rSprite )
- {
+ {
// downcast to derived vclcanvas::Sprite interface, which
// provides the actual redraw methods.
::boost::polymorphic_downcast< Sprite* >(rSprite.get())->redraw(rOutDev,
true);
}
- double calcNumPixel( const ::canvas::Sprite::Reference& rSprite )
+ double calcNumPixel( const ::canvas::Sprite::Reference& rSprite )
{
- const ::basegfx::B2DSize& rSize(
+ const ::basegfx::B2DSize& rSize(
::boost::polymorphic_downcast< Sprite* >(rSprite.get())->getSizePixel() );
return rSize.getX() * rSize.getY();
}
- void repaintBackground( OutputDevice& rOutDev,
- OutputDevice& rBackBuffer,
- const ::basegfx::B2DRange& rArea )
+ void repaintBackground( OutputDevice& rOutDev,
+ OutputDevice& rBackBuffer,
+ const ::basegfx::B2DRange& rArea )
{
const ::Point& rPos( ::vcl::unotools::pointFromB2DPoint( rArea.getMinimum()) );
const ::Size& rSize( ::vcl::unotools::sizeFromB2DSize( rArea.getRange()) );
@@ -93,7 +93,7 @@ namespace vclcanvas
OutputDevice& rOutDev,
const ::basegfx::B2IRange& rArea )
{
- const Rectangle& rRequestedArea(
+ const Rectangle& rRequestedArea(
::vcl::unotools::rectangleFromB2IRectangle( rArea ) );
// clip output to actual update region (otherwise a)
@@ -133,8 +133,8 @@ namespace vclcanvas
adapted size.
*/
void spriteRedrawStub2( OutputDevice& rOutDev,
- const ::basegfx::B2DPoint& rOutPos,
- const ::canvas::Sprite::Reference& rSprite )
+ const ::basegfx::B2DPoint& rOutPos,
+ const ::canvas::Sprite::Reference& rSprite )
{
if( rSprite.is() )
{
@@ -166,11 +166,11 @@ namespace vclcanvas
rSprite.get() )->redraw( rOutDev,
false );
}
- }
+ }
- void renderInfoText( OutputDevice& rOutDev,
+ void renderInfoText( OutputDevice& rOutDev,
const ::rtl::OUString& rStr,
- const Point& rPos )
+ const Point& rPos )
{
Font aVCLFont;
aVCLFont.SetHeight( 20 );
@@ -200,7 +200,7 @@ namespace vclcanvas
#endif
}
- void SpriteCanvasHelper::init( const OutDevProviderSharedPtr& rOutDev,
+ void SpriteCanvasHelper::init( const OutDevProviderSharedPtr& rOutDev,
SpriteCanvas& rOwningSpriteCanvas,
::canvas::SpriteRedrawManager& rManager,
bool bProtect,
@@ -221,14 +221,14 @@ namespace vclcanvas
CanvasHelper::disposing();
}
- uno::Reference< rendering::XAnimatedSprite > SpriteCanvasHelper::createSpriteFromAnimation(
+ uno::Reference< rendering::XAnimatedSprite > SpriteCanvasHelper::createSpriteFromAnimation(
const uno::Reference< rendering::XAnimation >& )
{
return uno::Reference< rendering::XAnimatedSprite >();
}
- uno::Reference< rendering::XAnimatedSprite > SpriteCanvasHelper::createSpriteFromBitmaps(
- const uno::Sequence< uno::Reference< rendering::XBitmap > >& ,
+ uno::Reference< rendering::XAnimatedSprite > SpriteCanvasHelper::createSpriteFromBitmaps(
+ const uno::Sequence< uno::Reference< rendering::XBitmap > >& ,
sal_Int8 )
{
return uno::Reference< rendering::XAnimatedSprite >();
@@ -240,7 +240,7 @@ namespace vclcanvas
return uno::Reference< rendering::XCustomSprite >(); // we're disposed
return uno::Reference< rendering::XCustomSprite >(
- new CanvasCustomSprite( spriteSize,
+ new CanvasCustomSprite( spriteSize,
*mpDevice,
mpOwningSpriteCanvas,
mpOwningSpriteCanvas->getFrontBuffer(),
@@ -253,9 +253,9 @@ namespace vclcanvas
}
sal_Bool SpriteCanvasHelper::updateScreen( sal_Bool bUpdateAll,
- bool& io_bSurfaceDirty )
+ bool& io_bSurfaceDirty )
{
- if( !mpRedrawManager ||
+ if( !mpRedrawManager ||
!mpOwningSpriteCanvas ||
!mpOwningSpriteCanvas->getFrontBuffer() ||
!mpOwningSpriteCanvas->getBackBuffer() )
@@ -266,15 +266,15 @@ namespace vclcanvas
// commit to backbuffer
flush();
- OutputDevice& rOutDev( mpOwningSpriteCanvas->getFrontBuffer()->getOutDev() );
+ OutputDevice& rOutDev( mpOwningSpriteCanvas->getFrontBuffer()->getOutDev() );
BackBufferSharedPtr pBackBuffer( mpOwningSpriteCanvas->getBackBuffer() );
- OutputDevice& rBackOutDev( pBackBuffer->getOutDev() );
+ OutputDevice& rBackOutDev( pBackBuffer->getOutDev() );
// actual OutputDevice is a shared resource - restore its
// state when done.
tools::OutDevStateKeeper aStateKeeper( rOutDev );
- const Size aOutDevSize( rBackOutDev.GetOutputSizePixel() );
+ const Size aOutDevSize( rBackOutDev.GetOutputSizePixel() );
const Point aEmptyPoint(0,0);
Window* pTargetWindow = NULL;
@@ -320,13 +320,13 @@ namespace vclcanvas
maVDev->SetOutputSizePixel( aOutDevSize );
maVDev->EnableMapMode( FALSE );
- maVDev->DrawOutDev( aEmptyPoint, aOutDevSize,
- aEmptyPoint, aOutDevSize,
+ maVDev->DrawOutDev( aEmptyPoint, aOutDevSize,
+ aEmptyPoint, aOutDevSize,
rBackOutDev );
// repaint all active sprites on top of background into
// VDev.
- mpRedrawManager->forEachSprite(
+ mpRedrawManager->forEachSprite(
::boost::bind(
&spriteRedraw,
::boost::ref( maVDev.get() ),
@@ -335,9 +335,9 @@ namespace vclcanvas
// flush to screen
rOutDev.EnableMapMode( FALSE );
rOutDev.SetClipRegion();
- rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize,
- aEmptyPoint, aOutDevSize,
- *maVDev );
+ rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize,
+ aEmptyPoint, aOutDevSize,
+ *maVDev );
}
// change record vector must be cleared, for the next turn of
@@ -355,9 +355,9 @@ namespace vclcanvas
#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
static ::canvas::tools::ElapsedTime aElapsedTime;
-
+
// log time immediately after surface flip
- OSL_TRACE( "SpriteCanvasHelper::updateScreen(): flip done at %f",
+ OSL_TRACE( "SpriteCanvasHelper::updateScreen(): flip done at %f",
aElapsedTime.getElapsedTime() );
#endif
@@ -381,15 +381,15 @@ namespace vclcanvas
mpOwningSpriteCanvas->getFrontBuffer(),
"SpriteCanvasHelper::backgroundPaint(): NULL device pointer " );
- OutputDevice& rOutDev( mpOwningSpriteCanvas->getFrontBuffer()->getOutDev() );
+ OutputDevice& rOutDev( mpOwningSpriteCanvas->getFrontBuffer()->getOutDev() );
BackBufferSharedPtr pBackBuffer( mpOwningSpriteCanvas->getBackBuffer() );
- OutputDevice& rBackOutDev( pBackBuffer->getOutDev() );
+ OutputDevice& rBackOutDev( pBackBuffer->getOutDev() );
repaintBackground( rOutDev, rBackOutDev, rUpdateRect );
}
- void SpriteCanvasHelper::scrollUpdate( const ::basegfx::B2DRange& rMoveStart,
- const ::basegfx::B2DRange& rMoveEnd,
+ void SpriteCanvasHelper::scrollUpdate( const ::basegfx::B2DRange& rMoveStart,
+ const ::basegfx::B2DRange& rMoveEnd,
const ::canvas::SpriteRedrawManager::UpdateArea& rUpdateArea )
{
ENSURE_OR_THROW( mpOwningSpriteCanvas &&
@@ -397,9 +397,9 @@ namespace vclcanvas
mpOwningSpriteCanvas->getFrontBuffer(),
"SpriteCanvasHelper::scrollUpdate(): NULL device pointer " );
- OutputDevice& rOutDev( mpOwningSpriteCanvas->getFrontBuffer()->getOutDev() );
+ OutputDevice& rOutDev( mpOwningSpriteCanvas->getFrontBuffer()->getOutDev() );
BackBufferSharedPtr pBackBuffer( mpOwningSpriteCanvas->getBackBuffer() );
- OutputDevice& rBackOutDev( pBackBuffer->getOutDev() );
+ OutputDevice& rBackOutDev( pBackBuffer->getOutDev() );
const Size& rTargetSizePixel( rOutDev.GetOutputSizePixel() );
const ::basegfx::B2IRange aOutputBounds( 0,0,
@@ -411,7 +411,7 @@ namespace vclcanvas
// the destination area: otherwise, the next scroll update
// would copy pixel that are not supposed to be part of
// the sprite.
- ::basegfx::B2IRange aSourceRect(
+ ::basegfx::B2IRange aSourceRect(
::canvas::tools::spritePixelAreaFromB2DRange( rMoveStart ) );
const ::basegfx::B2IRange& rDestRect(
::canvas::tools::spritePixelAreaFromB2DRange( rMoveEnd ) );
@@ -440,7 +440,7 @@ namespace vclcanvas
// repaint all affected sprites directly to output device
::std::for_each( rUpdateArea.maComponentList.begin(),
rUpdateArea.maComponentList.end(),
- ::boost::bind(
+ ::boost::bind(
&spriteRedrawStub3,
::boost::ref( rOutDev ),
_1 ) );
@@ -454,11 +454,11 @@ namespace vclcanvas
::Size( static_cast<sal_Int32>(aSourceRect.getRange().getX()),
static_cast<sal_Int32>(aSourceRect.getRange().getY()) ) );
- const ::canvas::SpriteRedrawManager::SpriteConnectedRanges::ComponentListType::const_iterator
+ const ::canvas::SpriteRedrawManager::SpriteConnectedRanges::ComponentListType::const_iterator
aFirst( rUpdateArea.maComponentList.begin() );
- ::canvas::SpriteRedrawManager::SpriteConnectedRanges::ComponentListType::const_iterator
+ ::canvas::SpriteRedrawManager::SpriteConnectedRanges::ComponentListType::const_iterator
aSecond( aFirst ); ++aSecond;
-
+
ENSURE_OR_THROW( aFirst->second.getSprite().is(),
"VCLCanvas::scrollUpdate(): no sprite" );
@@ -489,7 +489,7 @@ namespace vclcanvas
::boost::ref(rBackOutDev),
_1 ) );
}
-
+
void SpriteCanvasHelper::opaqueUpdate( const ::basegfx::B2DRange& rTotalArea,
const ::std::vector< ::canvas::Sprite::Reference >& rSortedUpdateSprites )
{
@@ -512,12 +512,12 @@ namespace vclcanvas
// repaint all affected sprites directly to output device
::std::for_each( rSortedUpdateSprites.begin(),
rSortedUpdateSprites.end(),
- ::boost::bind(
+ ::boost::bind(
&spriteRedrawStub,
::boost::ref( rOutDev ),
_1 ) );
}
-
+
void SpriteCanvasHelper::genericUpdate( const ::basegfx::B2DRange& rRequestedArea,
const ::std::vector< ::canvas::Sprite::Reference >& rSortedUpdateSprites )
{
@@ -526,9 +526,9 @@ namespace vclcanvas
mpOwningSpriteCanvas->getFrontBuffer(),
"SpriteCanvasHelper::genericUpdate(): NULL device pointer " );
- OutputDevice& rOutDev( mpOwningSpriteCanvas->getFrontBuffer()->getOutDev() );
+ OutputDevice& rOutDev( mpOwningSpriteCanvas->getFrontBuffer()->getOutDev() );
BackBufferSharedPtr pBackBuffer( mpOwningSpriteCanvas->getBackBuffer() );
- OutputDevice& rBackOutDev( pBackBuffer->getOutDev() );
+ OutputDevice& rBackOutDev( pBackBuffer->getOutDev() );
// limit size of update VDev to target outdev's size
const Size& rTargetSizePixel( rOutDev.GetOutputSizePixel() );
@@ -537,7 +537,7 @@ namespace vclcanvas
// a fraction of a sprite pixel... Clip position at origin,
// otherwise, truncation of size below might leave visible
// areas uncovered by VDev.
- const ::Point aOutputPosition(
+ const ::Point aOutputPosition(
::std::max( sal_Int32( 0 ),
static_cast< sal_Int32 >(rRequestedArea.getMinX()) ),
::std::max( sal_Int32( 0 ),
@@ -546,7 +546,7 @@ namespace vclcanvas
// fraction of a sprite pixel... Limit coverage of VDev to
// output device's area (i.e. not only to total size, but to
// cover _only_ the visible parts).
- const ::Size aOutputSize(
+ const ::Size aOutputSize(
::std::max( sal_Int32( 0 ),
::std::min( static_cast< sal_Int32 >(rTargetSizePixel.Width() - aOutputPosition.X()),
::canvas::tools::roundUp( rRequestedArea.getMaxX() - aOutputPosition.X() ))),
@@ -568,7 +568,7 @@ namespace vclcanvas
// repaint.
if( aCurrOutputSize.Width() < aOutputSize.Width() ||
aCurrOutputSize.Height() < aOutputSize.Height() )
- {
+ {
// TODO(P1): Come up with a clever tactic to reduce maVDev
// from time to time. Reduction with threshold (say, if
// maVDev is more than twice too large) is not wise, as
@@ -580,10 +580,10 @@ namespace vclcanvas
// paint background
maVDev->EnableMapMode( FALSE );
maVDev->SetClipRegion();
- maVDev->DrawOutDev( aEmptyPoint, aOutputSize,
- aOutputPosition, aOutputSize,
+ maVDev->DrawOutDev( aEmptyPoint, aOutputSize,
+ aOutputPosition, aOutputSize,
rBackOutDev );
-
+
// repaint all affected sprites on top of background into
// VDev.
::std::for_each( rSortedUpdateSprites.begin(),
@@ -596,16 +596,16 @@ namespace vclcanvas
// flush to screen
rOutDev.EnableMapMode( FALSE );
- rOutDev.DrawOutDev( aOutputPosition, aOutputSize,
- aEmptyPoint, aOutputSize,
- *maVDev );
+ rOutDev.DrawOutDev( aOutputPosition, aOutputSize,
+ aEmptyPoint, aOutputSize,
+ *maVDev );
}
-
+
void SpriteCanvasHelper::renderFrameCounter( OutputDevice& rOutDev )
{
const double denominator( maLastUpdate.getElapsedTime() );
maLastUpdate.reset();
-
+
::rtl::OUString text( ::rtl::math::doubleToUString( denominator == 0.0 ? 100.0 : 1.0/denominator,
rtl_math_StringFormat_F,
2,'.',NULL,' ') );
@@ -617,7 +617,7 @@ namespace vclcanvas
text += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM (" fps"));
renderInfoText( rOutDev,
- text,
+ text,
Point(0, 0) );
}
@@ -656,19 +656,19 @@ namespace vclcanvas
sal_Int32 nCount(0);
mpRedrawManager->forEachSprite( makeAdder(nCount,sal_Int32(1)) );
- ::rtl::OUString text(
- ::rtl::OUString::valueOf(
+ ::rtl::OUString text(
+ ::rtl::OUString::valueOf(
// disambiguate overload...
static_cast<sal_Int64>(nCount) ) );
// pad with leading space
while( text.getLength() < 3 )
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM (" ")) + text;
-
+
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Sprites: ")) + text;
-
+
renderInfoText( rOutDev,
- text,
+ text,
Point(0, 30) );
}
}
@@ -688,31 +688,31 @@ namespace vclcanvas
::boost::bind(
&calcNumPixel,
_1 ) ) );
-
+
static const int NUM_VIRDEV(2);
static const int BYTES_PER_PIXEL(3);
-
+
const Size& rVDevSize( maVDev->GetOutputSizePixel() );
const Size& rBackBufferSize( pBackBuffer->getOutDev().GetOutputSizePixel() );
-
+
const double nMemUsage( nPixel * NUM_VIRDEV * BYTES_PER_PIXEL +
rVDevSize.Width()*rVDevSize.Height() * BYTES_PER_PIXEL +
rBackBufferSize.Width()*rBackBufferSize.Height() * BYTES_PER_PIXEL );
-
+
::rtl::OUString text( ::rtl::math::doubleToUString( nMemUsage / 1048576.0,
rtl_math_StringFormat_F,
2,'.',NULL,' ') );
-
+
// pad with leading space
while( text.getLength() < 4 )
text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM (" ")) + text;
-
- text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Mem: ")) +
- text +
+
+ text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("Mem: ")) +
+ text +
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("MB"));
-
+
renderInfoText( rOutDev,
- text,
+ text,
Point(0, 60) );
}
}
diff --git a/canvas/source/vcl/spritecanvashelper.hxx b/canvas/source/vcl/spritecanvashelper.hxx
index b0b717f18697..da33592f4bc3 100644
--- a/canvas/source/vcl/spritecanvashelper.hxx
+++ b/canvas/source/vcl/spritecanvashelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,7 +51,7 @@ namespace vclcanvas
public:
SpriteCanvasHelper();
- void init( const OutDevProviderSharedPtr& rOutDev,
+ void init( const OutDevProviderSharedPtr& rOutDev,
SpriteCanvas& rOwningSpriteCanvas,
::canvas::SpriteRedrawManager& rManager,
bool bProtect,
@@ -61,23 +61,23 @@ namespace vclcanvas
void disposing();
// XSpriteCanvas
- ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XAnimatedSprite > createSpriteFromAnimation(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XAnimatedSprite > createSpriteFromAnimation(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XAnimation >& animation );
- ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XAnimatedSprite > createSpriteFromBitmaps(
- const ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XBitmap > >& animationBitmaps,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XAnimatedSprite > createSpriteFromBitmaps(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XBitmap > >& animationBitmaps,
sal_Int8 interpolationMode );
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XCustomSprite > createCustomSprite(
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XCustomSprite > createCustomSprite(
const ::com::sun::star::geometry::RealSize2D& spriteSize );
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::rendering::XSprite > createClonedSprite(
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XSprite > createClonedSprite(
const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XSprite >& original );
/** Actually perform the screen update
@@ -91,7 +91,7 @@ namespace vclcanvas
yes, we're performing a full update, anyway)
*/
sal_Bool updateScreen( sal_Bool bUpdateAll,
- bool& io_bSurfaceDirty );
+ bool& io_bSurfaceDirty );
// SpriteRedrawManager functor calls
// -------------------------------------------------
@@ -116,9 +116,9 @@ namespace vclcanvas
All info necessary, should rMoveStart be partially or
fully outside the outdev
*/
- void scrollUpdate( const ::basegfx::B2DRange& rMoveStart,
- const ::basegfx::B2DRange& rMoveEnd,
- const ::canvas::SpriteRedrawManager::UpdateArea& rUpdateArea );
+ void scrollUpdate( const ::basegfx::B2DRange& rMoveStart,
+ const ::basegfx::B2DRange& rMoveEnd,
+ const ::canvas::SpriteRedrawManager::UpdateArea& rUpdateArea );
void opaqueUpdate( const ::basegfx::B2DRange& rTotalArea,
const ::std::vector< ::canvas::Sprite::Reference >& rSortedUpdateSprites );
@@ -126,22 +126,22 @@ namespace vclcanvas
void genericUpdate( const ::basegfx::B2DRange& rTotalArea,
const ::std::vector< ::canvas::Sprite::Reference >& rSortedUpdateSprites );
- ::com::sun::star::uno::Any isUnsafeScrolling() const
- {
- return ::com::sun::star::uno::makeAny(mbIsUnsafeScrolling);
+ ::com::sun::star::uno::Any isUnsafeScrolling() const
+ {
+ return ::com::sun::star::uno::makeAny(mbIsUnsafeScrolling);
}
- void enableUnsafeScrolling( const ::com::sun::star::uno::Any& rAny )
- {
- mbIsUnsafeScrolling = rAny.get<bool>();
+ void enableUnsafeScrolling( const ::com::sun::star::uno::Any& rAny )
+ {
+ mbIsUnsafeScrolling = rAny.get<bool>();
}
::com::sun::star::uno::Any isSpriteBounds() const
- {
- return ::com::sun::star::uno::makeAny(mbShowSpriteBounds);
+ {
+ return ::com::sun::star::uno::makeAny(mbShowSpriteBounds);
}
void enableSpriteBounds( const ::com::sun::star::uno::Any& rAny )
- {
- mbShowSpriteBounds = rAny.get<bool>();
+ {
+ mbShowSpriteBounds = rAny.get<bool>();
}
private:
@@ -150,7 +150,7 @@ namespace vclcanvas
void renderMemUsage( OutputDevice& rOutDev );
/// Set from the SpriteCanvas: instance coordinating sprite redraw
- ::canvas::SpriteRedrawManager* mpRedrawManager;
+ ::canvas::SpriteRedrawManager* mpRedrawManager;
/// Set from the init method. used to generate sprites
SpriteCanvas* mpOwningSpriteCanvas;
@@ -160,16 +160,16 @@ namespace vclcanvas
Typically, sprites will be composited in the background,
before pushing them to screen. This happens here.
*/
- ::canvas::vcltools::VCLObject< VirtualDevice > maVDev;
+ ::canvas::vcltools::VCLObject< VirtualDevice > maVDev;
/// For the frame counter timings
- ::canvas::tools::ElapsedTime maLastUpdate;
+ ::canvas::tools::ElapsedTime maLastUpdate;
/// When true, canvas displays debug info on each frame
- bool mbShowFrameInfo;
+ bool mbShowFrameInfo;
/// When true, canvas creates all new sprites with red lines in the corners
- bool mbShowSpriteBounds;
+ bool mbShowSpriteBounds;
/// When true, canvas uses the scroll optimization (direct scrolls in front buffer)
bool mbIsUnsafeScrolling;
diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx
index c11adbd7abc0..2e07f38dfc9c 100644
--- a/canvas/source/vcl/spritedevicehelper.cxx
+++ b/canvas/source/vcl/spritedevicehelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,7 +66,7 @@ namespace vclcanvas
mpBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | mpBackBuffer->getOutDev().GetAntialiasing() );
#else
// switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and
- // is not required to do AA. It would need to be adapted to use it correctly
+ // is not required to do AA. It would need to be adapted to use it correctly
// (especially gradient painting). This will need extra work.
mpBackBuffer->getOutDev().SetAntialiasing(mpBackBuffer->getOutDev().GetAntialiasing() & !ANTIALIASING_ENABLE_B2DDRAW);
#endif
@@ -106,30 +106,30 @@ namespace vclcanvas
DeviceHelper::disposing();
}
-
+
uno::Any SpriteDeviceHelper::isAccelerated() const
{
return DeviceHelper::isAccelerated();
}
-
+
uno::Any SpriteDeviceHelper::getDeviceHandle() const
{
return DeviceHelper::getDeviceHandle();
}
-
+
uno::Any SpriteDeviceHelper::getSurfaceHandle() const
{
if( !mpBackBuffer )
return uno::Any();
- return uno::makeAny(
+ return uno::makeAny(
reinterpret_cast< sal_Int64 >(&mpBackBuffer->getOutDev()) );
}
void SpriteDeviceHelper::notifySizeUpdate( const awt::Rectangle& rBounds )
{
if( mpBackBuffer )
- mpBackBuffer->setSize( ::Size(rBounds.Width,
+ mpBackBuffer->setSize( ::Size(rBounds.Width,
rBounds.Height) );
}
@@ -144,9 +144,9 @@ namespace vclcanvas
String aFilename( String::CreateFromAscii("dbg_backbuffer") );
aFilename += String::CreateFromInt32(nFilePostfixCount);
aFilename += String::CreateFromAscii(".bmp");
-
+
SvFileStream aStream( aFilename, STREAM_STD_READWRITE );
-
+
const ::Point aEmptyPoint;
mpBackBuffer->getOutDev().EnableMapMode( FALSE );
aStream << mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint,
@@ -155,7 +155,7 @@ namespace vclcanvas
++nFilePostfixCount;
}
-
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/spritedevicehelper.hxx b/canvas/source/vcl/spritedevicehelper.hxx
index 2034748cdb1f..d0f8dbcbe37f 100644
--- a/canvas/source/vcl/spritedevicehelper.hxx
+++ b/canvas/source/vcl/spritedevicehelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,7 +61,7 @@ namespace vclcanvas
void disposing();
::sal_Int32 createBuffers( ::sal_Int32 nBuffers );
- void destroyBuffers( );
+ void destroyBuffers( );
::sal_Bool showBuffer( bool bWindowVisible, ::sal_Bool bUpdateAll );
::sal_Bool switchBuffer( bool bWindowVisible, ::sal_Bool bUpdateAll );
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 2fa8a6d441c4..240dbbf80ac7 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -77,11 +77,11 @@ namespace vclcanvas
{
ENSURE_OR_THROW( rOwningSpriteCanvas.get() && rBackBuffer && rBackBufferMask,
"SpriteHelper::init(): Invalid sprite canvas or back buffer" );
-
- mpBackBuffer = rBackBuffer;
- mpBackBufferMask = rBackBufferMask;
- mbShowSpriteBounds = bShowSpriteBounds;
-
+
+ mpBackBuffer = rBackBuffer;
+ mpBackBufferMask = rBackBufferMask;
+ mbShowSpriteBounds = bShowSpriteBounds;
+
init( rSpriteSize, rOwningSpriteCanvas );
}
@@ -93,22 +93,22 @@ namespace vclcanvas
// forward to parent
CanvasCustomSpriteHelper::disposing();
}
-
+
void SpriteHelper::redraw( OutputDevice& rTargetSurface,
- const ::basegfx::B2DPoint& rPos,
- bool& io_bSurfacesDirty,
+ const ::basegfx::B2DPoint& rPos,
+ bool& io_bSurfacesDirty,
bool bBufferedUpdate ) const
{
(void)bBufferedUpdate; // not used on every platform
- if( !mpBackBuffer ||
+ if( !mpBackBuffer ||
!mpBackBufferMask )
{
return; // we're disposed
}
// log output pos in device pixel
- VERBOSE_TRACE( "SpriteHelper::redraw(): output pos is (%f, %f)",
+ VERBOSE_TRACE( "SpriteHelper::redraw(): output pos is (%f, %f)",
rPos.getX(),
rPos.getY() );
@@ -117,16 +117,16 @@ namespace vclcanvas
if( isActive() &&
!::basegfx::fTools::equalZero( fAlpha ) )
{
- const Point aEmptyPoint;
- const ::basegfx::B2DVector& rOrigOutputSize( getSizePixel() );
+ const Point aEmptyPoint;
+ const ::basegfx::B2DVector& rOrigOutputSize( getSizePixel() );
// might get changed below (e.g. adapted for
// transformations). IMPORTANT: both position and size are
// rounded to integer values. From now on, only those
// rounded values are used, to keep clip and content in
// sync.
- ::Size aOutputSize( ::vcl::unotools::sizeFromB2DSize( rOrigOutputSize ) );
- ::Point aOutPos( ::vcl::unotools::pointFromB2DPoint( rPos ) );
+ ::Size aOutputSize( ::vcl::unotools::sizeFromB2DSize( rOrigOutputSize ) );
+ ::Point aOutPos( ::vcl::unotools::pointFromB2DPoint( rPos ) );
// TODO(F3): Support for alpha-VDev
@@ -141,10 +141,10 @@ namespace vclcanvas
// longer dirty in relation to our cache
io_bSurfacesDirty = false;
transformUpdated();
-
+
if( bNeedBitmapUpdate )
{
- Bitmap aBmp( mpBackBuffer->getOutDev().GetBitmap( aEmptyPoint,
+ Bitmap aBmp( mpBackBuffer->getOutDev().GetBitmap( aEmptyPoint,
aOutputSize ) );
if( isContentFullyOpaque() )
@@ -159,7 +159,7 @@ namespace vclcanvas
{
// sprite content might contain alpha, create
// BmpEx, then.
- Bitmap aMask( mpBackBufferMask->getOutDev().GetBitmap( aEmptyPoint,
+ Bitmap aMask( mpBackBufferMask->getOutDev().GetBitmap( aEmptyPoint,
aOutputSize ) );
// bitmasks are much faster than alphamasks on some platforms
@@ -193,7 +193,7 @@ namespace vclcanvas
// to translate the clip polygon
aTransform.translate( aOutPos.X(),
aOutPos.Y() );
-
+
if( !bIdentityTransform )
{
if( !::basegfx::fTools::equalZero( aTransform.get(0,1) ) ||
@@ -205,14 +205,14 @@ namespace vclcanvas
// modify output position, to account for the fact
// that transformBitmap() always normalizes its output
// bitmap into the smallest enclosing box.
- ::basegfx::B2DRectangle aDestRect;
- ::canvas::tools::calcTransformedRectBounds( aDestRect,
+ ::basegfx::B2DRectangle aDestRect;
+ ::canvas::tools::calcTransformedRectBounds( aDestRect,
::basegfx::B2DRectangle(0,
0,
rOrigOutputSize.getX(),
rOrigOutputSize.getY()),
aTransform );
-
+
aOutPos.X() = ::basegfx::fround( aDestRect.getMinX() );
aOutPos.Y() = ::basegfx::fround( aDestRect.getMinY() );
@@ -221,7 +221,7 @@ namespace vclcanvas
// actually re-create the bitmap ONLY if necessary
if( bNeedBitmapUpdate )
maContent = tools::transformBitmap( *maContent,
- aTransform,
+ aTransform,
uno::Sequence<double>(),
tools::MODULATE_NONE );
@@ -231,9 +231,9 @@ namespace vclcanvas
{
// relatively 'simplistic' transformation -
// retrieve scale and translational offset
- aOutputSize.setWidth (
+ aOutputSize.setWidth (
::basegfx::fround( rOrigOutputSize.getX() * aTransform.get(0,0) ) );
- aOutputSize.setHeight(
+ aOutputSize.setHeight(
::basegfx::fround( rOrigOutputSize.getY() * aTransform.get(1,1) ) );
aOutPos.X() = ::basegfx::fround( aTransform.get(0,2) );
@@ -250,12 +250,12 @@ namespace vclcanvas
bool bSpriteRedrawn( false );
rTargetSurface.Push( PUSH_CLIPREGION );
-
+
// apply clip (if any)
if( getClip().is() )
{
::basegfx::B2DPolyPolygon aClipPoly(
- ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(
+ ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(
getClip() ));
if( aClipPoly.count() )
@@ -278,7 +278,7 @@ namespace vclcanvas
// when filling complex polypolygons.
bool bAtLeastOnePolygon( false );
const sal_Int32 nPolygons( aClipPoly.count() );
-
+
for( sal_Int32 i=0; i<nPolygons; ++i )
{
if( !::basegfx::tools::isRectangle(
@@ -321,8 +321,8 @@ namespace vclcanvas
// underneath.
rTargetSurface.Push( PUSH_RASTEROP );
rTargetSurface.SetRasterOp( ROP_XOR );
- rTargetSurface.DrawBitmap( aOutPos,
- aOutputSize,
+ rTargetSurface.DrawBitmap( aOutPos,
+ aOutputSize,
maContent->GetBitmap() );
rTargetSurface.SetLineColor();
@@ -331,10 +331,10 @@ namespace vclcanvas
rTargetSurface.DrawPolyPolygon(PolyPolygon(aClipPoly)); // #i76339#
rTargetSurface.SetRasterOp( ROP_XOR );
- rTargetSurface.DrawBitmap( aOutPos,
- aOutputSize,
+ rTargetSurface.DrawBitmap( aOutPos,
+ aOutputSize,
maContent->GetBitmap() );
-
+
rTargetSurface.Pop();
bSpriteRedrawn = true;
@@ -346,7 +346,7 @@ namespace vclcanvas
// or using alpha blending - cannot use
// XOR, thus, employing the still somewhat
// speedier triangle clip method
- ::basegfx::B2DPolygon aTriangulatedClip(::basegfx::triangulator::triangulate(aClipPoly));
+ ::basegfx::B2DPolygon aTriangulatedClip(::basegfx::triangulator::triangulate(aClipPoly));
// restrict the clipping area to the visible portion of the output device.
Size aSize(rTargetSurface.GetOutputSizePixel());
@@ -378,16 +378,16 @@ namespace vclcanvas
// draw semi-transparent
BYTE nColor( static_cast<UINT8>( ::basegfx::fround( 255.0*(1.0 - fAlpha) + .5) ) );
- AlphaMask aAlpha( maContent->GetSizePixel(),
+ AlphaMask aAlpha( maContent->GetSizePixel(),
&nColor );
-
+
// mask out fully transparent areas
if( maContent->IsTransparent() )
aAlpha.Replace( maContent->GetMask(), 255 );
- // alpha-blend to output
- rTargetSurface.DrawBitmapEx( aOutPos, aOutputSize,
- BitmapEx( maContent->GetBitmap(),
+ // alpha-blend to output
+ rTargetSurface.DrawBitmapEx( aOutPos, aOutputSize,
+ BitmapEx( maContent->GetBitmap(),
aAlpha ) );
}
}
@@ -396,7 +396,7 @@ namespace vclcanvas
if( mbShowSpriteBounds )
{
- ::PolyPolygon aMarkerPoly(
+ ::PolyPolygon aMarkerPoly(
::canvas::tools::getBoundMarksPolyPolygon(
::basegfx::B2DRectangle(aOutPos.X(),
aOutPos.Y(),
@@ -416,19 +416,19 @@ namespace vclcanvas
Font aVCLFont;
aVCLFont.SetHeight( std::min(long(20),aOutputSize.Height()) );
aVCLFont.SetColor( COL_RED );
-
+
rTargetSurface.SetTextAlign(ALIGN_TOP);
rTargetSurface.SetTextColor( COL_RED );
rTargetSurface.SetFont( aVCLFont );
-
+
::rtl::OUString text( ::rtl::math::doubleToUString( getPriority(),
rtl_math_StringFormat_F,
2,'.',NULL,' ') );
-
+
rTargetSurface.DrawText( aOutPos+Point(2,2), text );
#if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0
- OSL_TRACE( "SpriteHelper::redraw(): sprite %X has prio %f\n",
+ OSL_TRACE( "SpriteHelper::redraw(): sprite %X has prio %f\n",
this, getPriority() );
#endif
}
diff --git a/canvas/source/vcl/spritehelper.hxx b/canvas/source/vcl/spritehelper.hxx
index c40666c57e40..bc33ecd7b97b 100644
--- a/canvas/source/vcl/spritehelper.hxx
+++ b/canvas/source/vcl/spritehelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -77,9 +77,9 @@ namespace vclcanvas
*/
void init( const ::com::sun::star::geometry::RealSize2D& rSpriteSize,
const ::canvas::SpriteSurface::Reference& rOwningSpriteCanvas,
- const BackBufferSharedPtr& rBackBuffer,
- const BackBufferSharedPtr& rBackBufferMask,
- bool bShowSpriteBounds );
+ const BackBufferSharedPtr& rBackBuffer,
+ const BackBufferSharedPtr& rBackBufferMask,
+ bool bShowSpriteBounds );
void disposing();
@@ -99,19 +99,19 @@ namespace vclcanvas
*/
void redraw( OutputDevice& rOutDev,
const ::basegfx::B2DPoint& rPos,
- bool& bSurfacesDirty,
+ bool& bSurfacesDirty,
bool bBufferedUpdate ) const;
private:
- virtual ::basegfx::B2DPolyPolygon polyPolygonFromXPolyPolygon2D(
+ virtual ::basegfx::B2DPolyPolygon polyPolygonFromXPolyPolygon2D(
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XPolyPolygon2D >& xPoly ) const;
// for the redraw
- BackBufferSharedPtr mpBackBuffer;
- BackBufferSharedPtr mpBackBufferMask;
+ BackBufferSharedPtr mpBackBuffer;
+ BackBufferSharedPtr mpBackBufferMask;
/// Cached bitmap for the current sprite content
- mutable ::canvas::vcltools::VCLObject<BitmapEx> maContent;
+ mutable ::canvas::vcltools::VCLObject<BitmapEx> maContent;
/// When true, line sprite corners in red
bool mbShowSpriteBounds;
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index ffd650dcd0bb..1bf6ff99dc9b 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,7 +56,7 @@ namespace vclcanvas
namespace
{
void setupLayoutMode( OutputDevice& rOutDev,
- sal_Int8 nTextDirection )
+ sal_Int8 nTextDirection )
{
// TODO(P3): avoid if already correctly set
ULONG nLayoutMode;
@@ -289,7 +289,7 @@ namespace vclcanvas
return 0.0;
}
- double SAL_CALL TextLayout::combinedJustify( const uno::Sequence< uno::Reference< rendering::XTextLayout > >& aNextLayouts,
+ double SAL_CALL TextLayout::combinedJustify( const uno::Sequence< uno::Reference< rendering::XTextLayout > >& aNextLayouts,
double nSize ) throw (lang::IllegalArgumentException, uno::RuntimeException)
{
SolarMutexGuard aGuard;
@@ -452,10 +452,10 @@ namespace vclcanvas
};
}
- void TextLayout::setupTextOffsets( sal_Int32* outputOffsets,
- const uno::Sequence< double >& inputOffsets,
- const rendering::ViewState& viewState,
- const rendering::RenderState& renderState ) const
+ void TextLayout::setupTextOffsets( sal_Int32* outputOffsets,
+ const uno::Sequence< double >& inputOffsets,
+ const rendering::ViewState& viewState,
+ const rendering::RenderState& renderState ) const
{
ENSURE_OR_THROW( outputOffsets!=NULL,
"TextLayout::setupTextOffsets offsets NULL" );
diff --git a/canvas/source/vcl/textlayout.hxx b/canvas/source/vcl/textlayout.hxx
index faca5c001cac..a052fdff6960 100644
--- a/canvas/source/vcl/textlayout.hxx
+++ b/canvas/source/vcl/textlayout.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,13 +51,13 @@ namespace vclcanvas
typedef ::cppu::WeakComponentImplHelper2< ::com::sun::star::rendering::XTextLayout,
::com::sun::star::lang::XServiceInfo > TextLayout_Base;
- class TextLayout : public ::comphelper::OBaseMutex,
+ class TextLayout : public ::comphelper::OBaseMutex,
public TextLayout_Base,
private ::boost::noncopyable
{
public:
- TextLayout( const ::com::sun::star::rendering::StringContext& aText,
- sal_Int8 nDirection,
+ TextLayout( const ::com::sun::star::rendering::StringContext& aText,
+ sal_Int8 nDirection,
sal_Int64 nRandomSeed,
const CanvasFont::Reference& rFont,
const ::com::sun::star::uno::Reference<
@@ -85,24 +85,24 @@ namespace vclcanvas
virtual sal_Int8 SAL_CALL getMainTextDirection( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > SAL_CALL getFont( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::rendering::StringContext SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException);
-
+
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
- bool draw( OutputDevice& rOutDev,
- const Point& rOutpos,
- const ::com::sun::star::rendering::ViewState& viewState,
+ bool draw( OutputDevice& rOutDev,
+ const Point& rOutpos,
+ const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState ) const;
private:
- void setupTextOffsets( sal_Int32* outputOffsets,
+ void setupTextOffsets( sal_Int32* outputOffsets,
const ::com::sun::star::uno::Sequence< double >& inputOffsets,
- const ::com::sun::star::rendering::ViewState& viewState,
- const ::com::sun::star::rendering::RenderState& renderState ) const;
+ const ::com::sun::star::rendering::ViewState& viewState,
+ const ::com::sun::star::rendering::RenderState& renderState ) const;
- ::com::sun::star::rendering::StringContext maText;
+ ::com::sun::star::rendering::StringContext maText;
::com::sun::star::uno::Sequence< double > maLogicalAdvancements;
CanvasFont::Reference mpFont;
::com::sun::star::uno::Reference<
diff --git a/canvas/source/vcl/windowoutdevholder.cxx b/canvas/source/vcl/windowoutdevholder.cxx
index 414cc3c9d4ed..ed2508761139 100644
--- a/canvas/source/vcl/windowoutdevholder.cxx
+++ b/canvas/source/vcl/windowoutdevholder.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/canvas/source/vcl/windowoutdevholder.hxx b/canvas/source/vcl/windowoutdevholder.hxx
index 4687b1d2e421..40f979252807 100644
--- a/canvas/source/vcl/windowoutdevholder.hxx
+++ b/canvas/source/vcl/windowoutdevholder.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,7 +39,7 @@
namespace vclcanvas
{
- class WindowOutDevHolder : public OutDevProvider,
+ class WindowOutDevHolder : public OutDevProvider,
private ::boost::noncopyable
{
public:
@@ -47,7 +47,7 @@ namespace vclcanvas
::com::sun::star::awt::XWindow>& xWin );
private:
- virtual OutputDevice& getOutDev() { return mrOutputWindow; }
+ virtual OutputDevice& getOutDev() { return mrOutputWindow; }
virtual const OutputDevice& getOutDev() const { return mrOutputWindow; }
// TODO(Q2): Lifetime issue. Though WindowGraphicDeviceBase
@@ -60,7 +60,7 @@ namespace vclcanvas
// vcl/source/window/window.cxx is broken, that disposes the
// canvas during window deletion, we're riding a dead horse
// here
- Window& mrOutputWindow;
+ Window& mrOutputWindow;
};
}