summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basebmp/inc/basebmp/bitmapdevice.hxx78
-rw-r--r--basebmp/inc/basebmp/clippedlinerenderer.hxx4
-rw-r--r--basebmp/inc/basebmp/polypolygonrenderer.hxx4
-rw-r--r--basebmp/inc/basebmp/tools.hxx10
-rw-r--r--basebmp/source/bitmapdevice.cxx225
-rw-r--r--basebmp/test/bmpdemo.cxx4
-rw-r--r--basebmp/test/bmpmasktest.cxx10
-rw-r--r--basebmp/test/bmptest.cxx22
-rw-r--r--basebmp/test/cliptest.cxx8
-rw-r--r--basebmp/test/masktest.cxx4
-rw-r--r--basebmp/test/polytest.cxx4
-rw-r--r--basegfx/inc/basegfx/tools/canvastools.hxx14
-rw-r--r--basegfx/source/tools/canvastools.cxx9
-rw-r--r--vcl/headless/svpbmp.cxx4
-rw-r--r--vcl/headless/svpgdi.cxx70
-rw-r--r--vcl/headless/svptext.cxx6
-rw-r--r--vcl/inc/headless/svpgdi.hxx2
-rw-r--r--vcl/inc/unx/gtk/gtkframe.hxx2
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx6
19 files changed, 252 insertions, 234 deletions
diff --git a/basebmp/inc/basebmp/bitmapdevice.hxx b/basebmp/inc/basebmp/bitmapdevice.hxx
index 99bb1b6a141a..1e6d73b92923 100644
--- a/basebmp/inc/basebmp/bitmapdevice.hxx
+++ b/basebmp/inc/basebmp/bitmapdevice.hxx
@@ -45,7 +45,7 @@ namespace basegfx
class B2IPoint;
class B2DPoint;
class B2IVector;
- class B2IRange;
+ class B2IBox;
class B2DPolygon;
class B2DPolyPolygon;
}
@@ -66,7 +66,7 @@ struct ImplBitmapDevice;
struct IBitmapDeviceDamageTracker
{
/// gets called when said region is clobbered
- virtual void damaged(const basegfx::B2IRange& rDamageRect) const = 0;
+ virtual void damaged(const basegfx::B2IBox& rDamageRect) const = 0;
};
/** Definition of BitmapDevice interface
@@ -82,7 +82,7 @@ struct IBitmapDeviceDamageTracker
is accepted, but potentially slow.
*/
class BASEBMP_DLLPUBLIC BitmapDevice : public boost::enable_shared_from_this<BitmapDevice>,
- private boost::noncopyable
+ private boost::noncopyable
{
public:
/** Query size of device in pixel
@@ -362,8 +362,8 @@ public:
Draw mode to use when changing pixel values
*/
void drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode );
/** Draw another bitmap into this device
@@ -395,8 +395,8 @@ public:
pixel is 1 will not be modified.
*/
void drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip );
@@ -429,7 +429,7 @@ public:
*/
void drawMaskedColor( Color aSrcColor,
const BitmapDeviceSharedPtr& rAlphaMask,
- const basegfx::B2IRange& rSrcRect,
+ const basegfx::B2IBox& rSrcRect,
const basegfx::B2IPoint& rDstPoint );
/** Draw a color with an alpha-modulation bitmap into this device
@@ -465,7 +465,7 @@ public:
*/
void drawMaskedColor( Color aSrcColor,
const BitmapDeviceSharedPtr& rAlphaMask,
- const basegfx::B2IRange& rSrcRect,
+ const basegfx::B2IBox& rSrcRect,
const basegfx::B2IPoint& rDstPoint,
const BitmapDeviceSharedPtr& rClip );
@@ -506,8 +506,8 @@ public:
*/
void drawMaskedBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode );
/** Draw another bitmap through a mask into this device
@@ -551,18 +551,18 @@ public:
*/
void drawMaskedBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip );
protected:
- BitmapDevice( const basegfx::B2IRange& rBounds,
- sal_Int32 nScanlineFormat,
- sal_Int32 nScanlineStride,
- sal_uInt8* pFirstScanline,
- const RawMemorySharedArray& rMem,
- const PaletteMemorySharedVector& rPalette );
+ BitmapDevice( const basegfx::B2IBox& rBounds,
+ sal_Int32 nScanlineFormat,
+ sal_Int32 nScanlineStride,
+ sal_uInt8* pFirstScanline,
+ const RawMemorySharedArray& rMem,
+ const PaletteMemorySharedVector& rPalette );
virtual ~BitmapDevice();
@@ -571,8 +571,8 @@ private:
virtual bool isCompatibleClipMask( const BitmapDeviceSharedPtr& bmp ) const = 0;
virtual bool isCompatibleAlphaMask( const BitmapDeviceSharedPtr& bmp ) const = 0;
- virtual void clear_i( Color fillColor,
- const basegfx::B2IRange& rBounds ) = 0;
+ virtual void clear_i( Color fillColor,
+ const basegfx::B2IBox& rBounds ) = 0;
virtual void setPixel_i( const basegfx::B2IPoint& rPt,
Color lineColor,
@@ -588,22 +588,22 @@ private:
virtual void drawLine_i( const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color lineColor,
DrawMode drawMode ) = 0;
virtual void drawLine_i( const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color lineColor,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip ) = 0;
virtual void drawPolygon_i( const basegfx::B2DPolygon& rPoly,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color lineColor,
DrawMode drawMode ) = 0;
virtual void drawPolygon_i( const basegfx::B2DPolygon& rPoly,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color lineColor,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip ) = 0;
@@ -611,45 +611,45 @@ private:
virtual void fillPolyPolygon_i( const basegfx::B2DPolyPolygon& rPoly,
Color fillColor,
DrawMode drawMode,
- const basegfx::B2IRange& rBounds ) = 0;
+ const basegfx::B2IBox& rBounds ) = 0;
virtual void fillPolyPolygon_i( const basegfx::B2DPolyPolygon& rPoly,
Color fillColor,
DrawMode drawMode,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
const BitmapDeviceSharedPtr& rClip ) = 0;
// must work with *this == rSrcBitmap!
virtual void drawBitmap_i( const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode ) = 0;
virtual void drawBitmap_i( const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip ) = 0;
// must work with *this == rSrcBitmap!
virtual void drawMaskedColor_i( Color rSrcColor,
const BitmapDeviceSharedPtr& rAlphaMask,
- const basegfx::B2IRange& rSrcRect,
+ const basegfx::B2IBox& rSrcRect,
const basegfx::B2IPoint& rDstPoint ) = 0;
virtual void drawMaskedColor_i( Color rSrcColor,
const BitmapDeviceSharedPtr& rAlphaMask,
- const basegfx::B2IRange& rSrcRect,
+ const basegfx::B2IBox& rSrcRect,
const basegfx::B2IPoint& rDstPoint,
const BitmapDeviceSharedPtr& rClip ) = 0;
// must work with *this == rSrcBitmap!
virtual void drawMaskedBitmap_i( const BitmapDeviceSharedPtr& rSrcBitmap,
const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode ) = 0;
virtual void drawMaskedBitmap_i( const BitmapDeviceSharedPtr& rSrcBitmap,
const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip ) = 0;
@@ -700,8 +700,8 @@ BASEBMP_DLLPUBLIC BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVe
area. Useful to implement rectangular clips (usually faster than
setting up a 1bpp clip mask).
*/
-BASEBMP_DLLPUBLIC BitmapDeviceSharedPtr subsetBitmapDevice( const BitmapDeviceSharedPtr& rProto,
- const basegfx::B2IRange& rSubset );
+BASEBMP_DLLPUBLIC BitmapDeviceSharedPtr subsetBitmapDevice( const BitmapDeviceSharedPtr& rProto,
+ const basegfx::B2IBox& rSubset );
/** Factory method to clone a BitmapDevice from a given prototype.
diff --git a/basebmp/inc/basebmp/clippedlinerenderer.hxx b/basebmp/inc/basebmp/clippedlinerenderer.hxx
index e023581416d6..2fbf2f7acfe0 100644
--- a/basebmp/inc/basebmp/clippedlinerenderer.hxx
+++ b/basebmp/inc/basebmp/clippedlinerenderer.hxx
@@ -31,7 +31,7 @@
#include <basegfx/tools/rectcliptools.hxx>
#include <basegfx/point/b2ipoint.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <vigra/diff2d.hxx>
#include <vigra/iteratortraits.hxx>
@@ -200,7 +200,7 @@ inline bool prepareClip( sal_Int32 a1,
template< class Iterator, class Accessor >
void renderClippedLine( basegfx::B2IPoint aPt1,
basegfx::B2IPoint aPt2,
- const basegfx::B2IRange& rClipRect,
+ const basegfx::B2IBox& rClipRect,
typename Accessor::value_type color,
Iterator begin,
Accessor acc,
diff --git a/basebmp/inc/basebmp/polypolygonrenderer.hxx b/basebmp/inc/basebmp/polypolygonrenderer.hxx
index 6a7c391f31d0..37b568ea0b5b 100644
--- a/basebmp/inc/basebmp/polypolygonrenderer.hxx
+++ b/basebmp/inc/basebmp/polypolygonrenderer.hxx
@@ -31,7 +31,7 @@
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/range/b2drange.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygonfillrule.hxx>
@@ -147,7 +147,7 @@ namespace basebmp
void renderClippedPolyPolygon( DestIterator begin,
DestAccessor ad,
T fillColor,
- const basegfx::B2IRange& rClipRect,
+ const basegfx::B2IBox& rClipRect,
basegfx::B2DPolyPolygon const& rPoly,
basegfx::FillRule eFillRule )
{
diff --git a/basebmp/inc/basebmp/tools.hxx b/basebmp/inc/basebmp/tools.hxx
index 0b5fcb87a693..403041d79163 100644
--- a/basebmp/inc/basebmp/tools.hxx
+++ b/basebmp/inc/basebmp/tools.hxx
@@ -29,24 +29,24 @@
#ifndef INCLUDED_BASEBMP_TOOLS_HXX
#define INCLUDED_BASEBMP_TOOLS_HXX
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/point/b2ipoint.hxx>
#include <vigra/tuple.hxx>
#include <vigra/diff2d.hxx>
namespace basebmp
{
- inline vigra::Diff2D topLeft( const basegfx::B2IRange& rRange )
+ inline vigra::Diff2D topLeft( const basegfx::B2IBox& rRange )
{ return vigra::Diff2D(rRange.getMinX(),rRange.getMinY()); }
- inline vigra::Diff2D bottomRight( const basegfx::B2IRange& rRange )
+ inline vigra::Diff2D bottomRight( const basegfx::B2IBox& rRange )
{ return vigra::Diff2D(rRange.getMaxX(),rRange.getMaxY()); }
template< class Iterator, class Accessor >
inline vigra::triple<Iterator,Iterator,Accessor>
destIterRange(Iterator const& begin,
Accessor const& accessor,
- const basegfx::B2IRange& rRange)
+ const basegfx::B2IBox& rRange)
{
return vigra::triple<Iterator,Iterator,Accessor>(
begin + topLeft(rRange),
@@ -58,7 +58,7 @@ namespace basebmp
inline vigra::triple<Iterator,Iterator,Accessor>
srcIterRange(Iterator const& begin,
Accessor const& accessor,
- const basegfx::B2IRange& rRange)
+ const basegfx::B2IBox& rRange)
{
return vigra::triple<Iterator,Iterator,Accessor>(
begin + topLeft(rRange),
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index 04829832af73..5ac1550df157 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -26,10 +26,6 @@
*
************************************************************************/
-// FIXME: in vigra
-#if defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x580)
-#include <math.h> // needed for fabs, hypot
-#endif
#include "basebmp/bitmapdevice.hxx"
#include "basebmp/compositeiterator.hxx"
@@ -64,6 +60,8 @@
#include <osl/diagnose.h>
#include <basegfx/tools/tools.hxx>
+#include <basegfx/tools/canvastools.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/range/b2irange.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -292,7 +290,7 @@ namespace
// -------------------------------------------------------
- BitmapRenderer( const basegfx::B2IRange& rBounds,
+ BitmapRenderer( const basegfx::B2IBox& rBounds,
sal_Int32 nScanlineFormat,
sal_Int32 nScanlineStride,
sal_uInt8* pFirstScanline,
@@ -325,19 +323,19 @@ namespace
private:
- void damaged( const basegfx::B2IRange& rDamageRect ) const
+ void damaged( const basegfx::B2IBox& rDamageRect ) const
{
if( mpDamage )
mpDamage->damaged( rDamageRect );
}
void damagedPointSize( const basegfx::B2IPoint& rPoint,
- const basegfx::B2IRange& rSize ) const
+ const basegfx::B2IBox& rSize ) const
{
if( mpDamage ) {
basegfx::B2IPoint aLower( rPoint.getX() + rSize.getWidth(),
rPoint.getY() + rSize.getHeight() );
- damaged( basegfx::B2IRange( rPoint, aLower ) );
+ damaged( basegfx::B2IBox( rPoint, aLower ) );
}
}
@@ -347,7 +345,7 @@ namespace
return;
basegfx::B2IPoint aEnd( rDamagePoint.getX() + 1,
rDamagePoint.getY() + 1 );
- damaged( basegfx::B2IRange( rDamagePoint, aEnd ) );
+ damaged( basegfx::B2IBox( rDamagePoint, aEnd ) );
}
boost::shared_ptr<BitmapRenderer> getCompatibleBitmap( const BitmapDeviceSharedPtr& bmp ) const
@@ -394,8 +392,8 @@ namespace
return getCompatibleAlphaMask( bmp ).get() != NULL;
}
- virtual void clear_i( Color fillColor,
- const basegfx::B2IRange& rBounds )
+ virtual void clear_i( Color fillColor,
+ const basegfx::B2IBox& rBounds )
{
fillImage(destIterRange(maBegin,
maRawAccessor,
@@ -465,7 +463,7 @@ namespace
template< typename Iterator, typename Col, typename RawAcc >
void implRenderLine2( const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Col col,
const Iterator& begin,
const RawAcc& rawAcc )
@@ -478,13 +476,13 @@ namespace
rawAcc );
// TODO(P2): perhaps this needs pushing up the stack a bit
// to make more complex polygons more efficient ...
- damaged( basegfx::B2IRange( rPt1, rPt2 ) );
+ damaged( basegfx::B2IBox( rPt1, rPt2 ) );
}
template< typename Iterator, typename Accessor, typename RawAcc >
void implRenderLine( const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color col,
const Iterator& begin,
const Accessor& acc,
@@ -500,7 +498,7 @@ namespace
template< typename Iterator, typename RawAcc, typename XorAcc >
void implDrawLine( const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color col,
const Iterator& begin,
const RawAcc& rawAcc,
@@ -517,7 +515,7 @@ namespace
virtual void drawLine_i(const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color lineColor,
DrawMode drawMode )
{
@@ -537,7 +535,7 @@ namespace
virtual void drawLine_i(const basegfx::B2IPoint& rPt1,
const basegfx::B2IPoint& rPt2,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color lineColor,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip )
@@ -550,7 +548,7 @@ namespace
template< typename Iterator, typename RawAcc >
void implDrawPolygon( const basegfx::B2DPolygon& rPoly,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color col,
const Iterator& begin,
const RawAcc& acc )
@@ -581,7 +579,7 @@ namespace
}
virtual void drawPolygon_i(const basegfx::B2DPolygon& rPoly,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color lineColor,
DrawMode drawMode )
{
@@ -596,7 +594,7 @@ namespace
}
virtual void drawPolygon_i(const basegfx::B2DPolygon& rPoly,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
Color lineColor,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip )
@@ -616,7 +614,7 @@ namespace
Color col,
const Iterator& begin,
const RawAcc& acc,
- const basegfx::B2IRange& rBounds )
+ const basegfx::B2IBox& rBounds )
{
basegfx::B2DPolyPolygon aPoly( rPoly );
if( rPoly.areControlPointsUsed() )
@@ -633,14 +631,14 @@ namespace
if( mpDamage )
{
basegfx::B2DRange const aPolyBounds( basegfx::tools::getRange(aPoly) );
- damaged( basegfx::fround( aPolyBounds ) );
+ damaged( basegfx::unotools::b2ISurroundingBoxFromB2DRange( aPolyBounds ) );
}
}
virtual void fillPolyPolygon_i(const basegfx::B2DPolyPolygon& rPoly,
Color fillColor,
DrawMode drawMode,
- const basegfx::B2IRange& rBounds )
+ const basegfx::B2IBox& rBounds )
{
if( drawMode == DrawMode_XOR )
implFillPolyPolygon( rPoly, fillColor,
@@ -657,7 +655,7 @@ namespace
virtual void fillPolyPolygon_i(const basegfx::B2DPolyPolygon& rPoly,
Color fillColor,
DrawMode drawMode,
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
const BitmapDeviceSharedPtr& rClip )
{
if( drawMode == DrawMode_XOR )
@@ -674,8 +672,8 @@ namespace
template< typename Iterator, typename RawAcc >
void implDrawBitmap(const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
const Iterator& begin,
const RawAcc& acc)
{
@@ -695,8 +693,8 @@ namespace
template< typename Iterator, typename Acc >
void implDrawBitmapGeneric(const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
const Iterator& begin,
const Acc& acc)
{
@@ -713,8 +711,8 @@ namespace
}
virtual void drawBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode )
{
if( isCompatibleBitmap( rSrcBitmap ) )
@@ -743,8 +741,8 @@ namespace
}
virtual void drawBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip )
{
@@ -775,7 +773,7 @@ namespace
virtual void drawMaskedColor_i(Color aSrcColor,
const BitmapDeviceSharedPtr& rAlphaMask,
- const basegfx::B2IRange& rSrcRect,
+ const basegfx::B2IBox& rSrcRect,
const basegfx::B2IPoint& rDstPoint )
{
boost::shared_ptr<mask_bitmap_type> pMask( getCompatibleClipMask(rAlphaMask) );
@@ -824,7 +822,7 @@ namespace
virtual void drawMaskedColor_i(Color aSrcColor,
const BitmapDeviceSharedPtr& rAlphaMask,
- const basegfx::B2IRange& rSrcRect,
+ const basegfx::B2IBox& rSrcRect,
const basegfx::B2IPoint& rDstPoint,
const BitmapDeviceSharedPtr& rClip )
{
@@ -888,8 +886,8 @@ namespace
template< typename Iterator, typename Acc >
void implDrawMaskedBitmap(const BitmapDeviceSharedPtr& rSrcBitmap,
const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
const Iterator& begin,
const Acc& acc)
{
@@ -919,8 +917,8 @@ namespace
template< typename Iterator, typename Acc >
void implDrawMaskedBitmapGeneric(const BitmapDeviceSharedPtr& rSrcBitmap,
const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
const Iterator& begin,
const Acc& acc)
{
@@ -952,8 +950,8 @@ namespace
virtual void drawMaskedBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap,
const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode )
{
if( isCompatibleClipMask(rMask) &&
@@ -988,8 +986,8 @@ namespace
virtual void drawMaskedBitmap_i(const BitmapDeviceSharedPtr& rSrcBitmap,
const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip )
{
@@ -1052,7 +1050,7 @@ struct ImplBitmapDevice
area under the excluding-bottommost-and-rightmost-pixels fill
rule)
*/
- basegfx::B2IRange maBounds;
+ basegfx::B2IBox maBounds;
/** Bounds of the device.
@@ -1064,7 +1062,7 @@ struct ImplBitmapDevice
The member is used to clip line stroking against the device
bounds.
*/
- basegfx::B2IRange maLineClipRect;
+ basegfx::B2IBox maLineClipRect;
/// Scanline format, as provided at the constructor
sal_Int32 mnScanlineFormat;
@@ -1093,7 +1091,7 @@ struct ImplBitmapDevice
};
-BitmapDevice::BitmapDevice( const basegfx::B2IRange& rBounds,
+BitmapDevice::BitmapDevice( const basegfx::B2IBox& rBounds,
sal_Int32 nScanlineFormat,
sal_Int32 nScanlineStride,
sal_uInt8* pFirstScanline,
@@ -1104,10 +1102,7 @@ BitmapDevice::BitmapDevice( const basegfx::B2IRange& rBounds,
mpImpl->mpMem = rMem;
mpImpl->mpPalette = rPalette;
mpImpl->maBounds = rBounds;
- mpImpl->maLineClipRect = basegfx::B2IRange( rBounds.getMinX(),
- rBounds.getMinY(),
- rBounds.getMaxX()-1,
- rBounds.getMaxY()-1 );
+ mpImpl->maLineClipRect = rBounds;
mpImpl->mnScanlineFormat = nScanlineFormat;
mpImpl->mnScanlineStride = nScanlineStride;
mpImpl->mpFirstScanline = pFirstScanline;
@@ -1315,17 +1310,17 @@ void BitmapDevice::fillPolyPolygon( const basegfx::B2DPolyPolygon& rPoly,
namespace
{
void assertImagePoint( const basegfx::B2IPoint& rPt,
- const basegfx::B2IRange& rPermittedRange )
+ const basegfx::B2IBox& rPermittedRange )
{
(void)rPt; (void)rPermittedRange;
OSL_ASSERT( rPermittedRange.isInside(rPt) );
}
- void assertImageRange( const basegfx::B2IRange& rRange,
- const basegfx::B2IRange& rPermittedRange )
+ void assertImageRange( const basegfx::B2IBox& rRange,
+ const basegfx::B2IBox& rPermittedRange )
{
#if OSL_DEBUG_LEVEL > 0
- basegfx::B2IRange aRange( rRange );
+ basegfx::B2IBox aRange( rRange );
aRange.intersect( rPermittedRange );
OSL_ASSERT( aRange == rRange );
@@ -1336,15 +1331,15 @@ namespace
// TODO(Q3): Move canvas/canvastools.hxx clipBlit() down
// to basegfx, and use here!
- bool clipAreaImpl( ::basegfx::B2IRange& io_rSourceArea,
- ::basegfx::B2IPoint& io_rDestPoint,
- const ::basegfx::B2IRange& rSourceBounds,
- const ::basegfx::B2IRange& rDestBounds )
+ bool clipAreaImpl( ::basegfx::B2IBox& io_rSourceArea,
+ ::basegfx::B2IPoint& io_rDestPoint,
+ const ::basegfx::B2IBox& rSourceBounds,
+ const ::basegfx::B2IBox& rDestBounds )
{
const ::basegfx::B2IPoint aSourceTopLeft(
io_rSourceArea.getMinimum() );
- ::basegfx::B2IRange aLocalSourceArea( io_rSourceArea );
+ ::basegfx::B2IBox aLocalSourceArea( io_rSourceArea );
// clip source area (which must be inside rSourceBounds)
aLocalSourceArea.intersect( rSourceBounds );
@@ -1359,8 +1354,8 @@ namespace
const ::basegfx::B2IVector aLowerRightOffset(
aLocalSourceArea.getMaximum()-aSourceTopLeft );
- ::basegfx::B2IRange aLocalDestArea( io_rDestPoint + aUpperLeftOffset,
- io_rDestPoint + aLowerRightOffset );
+ ::basegfx::B2IBox aLocalDestArea( io_rDestPoint + aUpperLeftOffset,
+ io_rDestPoint + aLowerRightOffset );
// clip dest area (which must be inside rDestBounds)
aLocalDestArea.intersect( rDestBounds );
@@ -1375,8 +1370,8 @@ namespace
const ::basegfx::B2IVector aDestLowerRightOffset(
aLocalDestArea.getMaximum()-io_rDestPoint );
- io_rSourceArea = ::basegfx::B2IRange( aSourceTopLeft + aDestUpperLeftOffset,
- aSourceTopLeft + aDestLowerRightOffset );
+ io_rSourceArea = ::basegfx::B2IBox( aSourceTopLeft + aDestUpperLeftOffset,
+ aSourceTopLeft + aDestLowerRightOffset );
io_rDestPoint = aLocalDestArea.getMinimum();
return true;
@@ -1384,10 +1379,10 @@ namespace
// TODO(Q3): Move canvas/canvastools.hxx clipBlit() down
// to basegfx, and use here!
- bool clipAreaImpl( ::basegfx::B2IRange& io_rDestArea,
- ::basegfx::B2IRange& io_rSourceArea,
- const ::basegfx::B2IRange& rDestBounds,
- const ::basegfx::B2IRange& rSourceBounds )
+ bool clipAreaImpl( ::basegfx::B2IBox& io_rDestArea,
+ ::basegfx::B2IBox& io_rSourceArea,
+ const ::basegfx::B2IBox& rDestBounds,
+ const ::basegfx::B2IBox& rSourceBounds )
{
// extract inherent scale
const double nScaleX( io_rDestArea.getWidth() / (double)io_rSourceArea.getWidth() );
@@ -1399,7 +1394,7 @@ namespace
const ::basegfx::B2IPoint aSourceTopLeft(
io_rSourceArea.getMinimum() );
- ::basegfx::B2IRange aLocalSourceArea( io_rSourceArea );
+ ::basegfx::B2IBox aLocalSourceArea( io_rSourceArea );
// clip source area (which must be inside rSourceBounds)
aLocalSourceArea.intersect( rSourceBounds );
@@ -1414,10 +1409,10 @@ namespace
const ::basegfx::B2IVector aLowerRightOffset(
aLocalSourceArea.getMaximum()-aSourceTopLeft );
- ::basegfx::B2IRange aLocalDestArea( basegfx::fround(aDestTopLeft.getX() + nScaleX*aUpperLeftOffset.getX()),
- basegfx::fround(aDestTopLeft.getY() + nScaleY*aUpperLeftOffset.getY()),
- basegfx::fround(aDestTopLeft.getX() + nScaleX*aLowerRightOffset.getX()),
- basegfx::fround(aDestTopLeft.getY() + nScaleY*aLowerRightOffset.getY()) );
+ ::basegfx::B2IBox aLocalDestArea( basegfx::fround(aDestTopLeft.getX() + nScaleX*aUpperLeftOffset.getX()),
+ basegfx::fround(aDestTopLeft.getY() + nScaleY*aUpperLeftOffset.getY()),
+ basegfx::fround(aDestTopLeft.getX() + nScaleX*aLowerRightOffset.getX()),
+ basegfx::fround(aDestTopLeft.getY() + nScaleY*aLowerRightOffset.getY()) );
// clip dest area (which must be inside rDestBounds)
aLocalDestArea.intersect( rDestBounds );
@@ -1432,10 +1427,10 @@ namespace
const ::basegfx::B2IVector aDestLowerRightOffset(
aLocalDestArea.getMaximum()-aDestTopLeft );
- io_rSourceArea = ::basegfx::B2IRange( basegfx::fround(aSourceTopLeft.getX() + aDestUpperLeftOffset.getX()/nScaleX),
- basegfx::fround(aSourceTopLeft.getY() + aDestUpperLeftOffset.getY()/nScaleY),
- basegfx::fround(aSourceTopLeft.getX() + aDestLowerRightOffset.getX()/nScaleX),
- basegfx::fround(aSourceTopLeft.getY() + aDestLowerRightOffset.getY()/nScaleY) );
+ io_rSourceArea = ::basegfx::B2IBox( basegfx::fround(aSourceTopLeft.getX() + aDestUpperLeftOffset.getX()/nScaleX),
+ basegfx::fround(aSourceTopLeft.getY() + aDestUpperLeftOffset.getY()/nScaleY),
+ basegfx::fround(aSourceTopLeft.getX() + aDestLowerRightOffset.getX()/nScaleX),
+ basegfx::fround(aSourceTopLeft.getY() + aDestLowerRightOffset.getY()/nScaleY) );
io_rDestArea = aLocalDestArea;
// final source area clip (chopping round-offs)
@@ -1450,14 +1445,14 @@ namespace
}
void BitmapDevice::drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode )
{
const basegfx::B2IVector& rSrcSize( rSrcBitmap->getSize() );
- const basegfx::B2IRange aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
- basegfx::B2IRange aSrcRange( rSrcRect );
- basegfx::B2IRange aDestRange( rDstRect );
+ const basegfx::B2IBox aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
+ basegfx::B2IBox aSrcRange( rSrcRect );
+ basegfx::B2IBox aDestRange( rDstRect );
if( clipAreaImpl( aDestRange,
aSrcRange,
@@ -1472,8 +1467,8 @@ void BitmapDevice::drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
}
void BitmapDevice::drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip )
{
@@ -1484,9 +1479,9 @@ void BitmapDevice::drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
}
const basegfx::B2IVector& rSrcSize( rSrcBitmap->getSize() );
- const basegfx::B2IRange aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
- basegfx::B2IRange aSrcRange( rSrcRect );
- basegfx::B2IRange aDestRange( rDstRect );
+ const basegfx::B2IBox aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
+ basegfx::B2IBox aSrcRange( rSrcRect );
+ basegfx::B2IBox aDestRange( rDstRect );
if( clipAreaImpl( aDestRange,
aSrcRange,
@@ -1510,12 +1505,12 @@ void BitmapDevice::drawBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
void BitmapDevice::drawMaskedColor( Color aSrcColor,
const BitmapDeviceSharedPtr& rAlphaMask,
- const basegfx::B2IRange& rSrcRect,
+ const basegfx::B2IBox& rSrcRect,
const basegfx::B2IPoint& rDstPoint )
{
const basegfx::B2IVector& rSrcSize( rAlphaMask->getSize() );
- const basegfx::B2IRange aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
- basegfx::B2IRange aSrcRange( rSrcRect );
+ const basegfx::B2IBox aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
+ basegfx::B2IBox aSrcRange( rSrcRect );
basegfx::B2IPoint aDestPoint( rDstPoint );
if( clipAreaImpl( aSrcRange,
@@ -1537,8 +1532,8 @@ void BitmapDevice::drawMaskedColor( Color aSrcColor,
cloneBitmapDevice( aSize,
shared_from_this()) );
basegfx::B2ITuple aGcc3WorkaroundTemporary;
- const basegfx::B2IRange aAlphaRange( aGcc3WorkaroundTemporary,
- aSize );
+ const basegfx::B2IBox aAlphaRange( aGcc3WorkaroundTemporary,
+ aSize );
pAlphaCopy->drawBitmap(rAlphaMask,
aSrcRange,
aAlphaRange,
@@ -1554,7 +1549,7 @@ void BitmapDevice::drawMaskedColor( Color aSrcColor,
void BitmapDevice::drawMaskedColor( Color aSrcColor,
const BitmapDeviceSharedPtr& rAlphaMask,
- const basegfx::B2IRange& rSrcRect,
+ const basegfx::B2IBox& rSrcRect,
const basegfx::B2IPoint& rDstPoint,
const BitmapDeviceSharedPtr& rClip )
{
@@ -1565,8 +1560,8 @@ void BitmapDevice::drawMaskedColor( Color aSrcColor,
}
const basegfx::B2IVector& rSrcSize( rAlphaMask->getSize() );
- const basegfx::B2IRange aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
- basegfx::B2IRange aSrcRange( rSrcRect );
+ const basegfx::B2IBox aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
+ basegfx::B2IBox aSrcRange( rSrcRect );
basegfx::B2IPoint aDestPoint( rDstPoint );
if( clipAreaImpl( aSrcRange,
@@ -1590,8 +1585,8 @@ void BitmapDevice::drawMaskedColor( Color aSrcColor,
cloneBitmapDevice( aSize,
shared_from_this()) );
basegfx::B2ITuple aGcc3WorkaroundTemporary;
- const basegfx::B2IRange aAlphaRange( aGcc3WorkaroundTemporary,
- aSize );
+ const basegfx::B2IBox aAlphaRange( aGcc3WorkaroundTemporary,
+ aSize );
pAlphaCopy->drawBitmap(rAlphaMask,
aSrcRange,
aAlphaRange,
@@ -1613,16 +1608,16 @@ void BitmapDevice::drawMaskedColor( Color aSrcColor,
void BitmapDevice::drawMaskedBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode )
{
OSL_ASSERT( rMask->getSize() == rSrcBitmap->getSize() );
const basegfx::B2IVector& rSrcSize( rSrcBitmap->getSize() );
- const basegfx::B2IRange aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
- basegfx::B2IRange aSrcRange( rSrcRect );
- basegfx::B2IRange aDestRange( rDstRect );
+ const basegfx::B2IBox aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
+ basegfx::B2IBox aSrcRange( rSrcRect );
+ basegfx::B2IBox aDestRange( rDstRect );
if( clipAreaImpl( aDestRange,
aSrcRange,
@@ -1638,8 +1633,8 @@ void BitmapDevice::drawMaskedBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
void BitmapDevice::drawMaskedBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
const BitmapDeviceSharedPtr& rMask,
- const basegfx::B2IRange& rSrcRect,
- const basegfx::B2IRange& rDstRect,
+ const basegfx::B2IBox& rSrcRect,
+ const basegfx::B2IBox& rDstRect,
DrawMode drawMode,
const BitmapDeviceSharedPtr& rClip )
{
@@ -1652,9 +1647,9 @@ void BitmapDevice::drawMaskedBitmap( const BitmapDeviceSharedPtr& rSrcBitmap,
OSL_ASSERT( rMask->getSize() == rSrcBitmap->getSize() );
const basegfx::B2IVector& rSrcSize( rSrcBitmap->getSize() );
- const basegfx::B2IRange aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
- basegfx::B2IRange aSrcRange( rSrcRect );
- basegfx::B2IRange aDestRange( rDstRect );
+ const basegfx::B2IBox aSrcBounds( 0,0,rSrcSize.getX(),rSrcSize.getY() );
+ basegfx::B2IBox aSrcRange( rSrcRect );
+ basegfx::B2IBox aDestRange( rDstRect );
if( clipAreaImpl( aDestRange,
aSrcRange,
@@ -1703,7 +1698,7 @@ struct StdMasks
/// Produces a specialized renderer for the given pixel format
template< class FormatTraits, class MaskTraits >
BitmapDeviceSharedPtr createRenderer(
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
sal_Int32 nScanlineFormat,
sal_Int32 nScanlineStride,
sal_uInt8* pFirstScanline,
@@ -1717,7 +1712,7 @@ BitmapDeviceSharedPtr createRenderer(
template< class FormatTraits, class MaskTraits, class Accessor >
BitmapDeviceSharedPtr createRenderer(
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
sal_Int32 nScanlineFormat,
sal_Int32 nScanlineStride,
sal_uInt8* pFirstScanline,
@@ -1774,7 +1769,7 @@ PaletteMemorySharedVector createStandardPalette(
template< class FormatTraits, class MaskTraits >
BitmapDeviceSharedPtr createRenderer(
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
sal_Int32 nScanlineFormat,
sal_Int32 nScanlineStride,
sal_uInt8* pFirstScanline,
@@ -1798,7 +1793,7 @@ BitmapDeviceSharedPtr createRenderer(
template< class FormatTraits, class MaskTraits >
BitmapDeviceSharedPtr createRenderer(
- const basegfx::B2IRange& rBounds,
+ const basegfx::B2IBox& rBounds,
sal_Int32 nScanlineFormat,
sal_Int32 nScanlineStride,
sal_uInt8* pFirstScanline,
@@ -1860,7 +1855,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector&
sal_Int32 nScanlineFormat,
boost::shared_array< sal_uInt8 > pMem,
PaletteMemorySharedVector pPal,
- const basegfx::B2IRange* pSubset,
+ const basegfx::B2IBox* pSubset,
const IBitmapDeviceDamageTrackerSharedPtr& rDamage )
{
if( nScanlineFormat <= Format::NONE ||
@@ -1917,7 +1912,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector&
pMem.get() + nMemSize + nScanlineStride : pMem.get();
// shrink render area to given subset, if given
- basegfx::B2IRange aBounds(0,0,rSize.getX(),rSize.getY());
+ basegfx::B2IBox aBounds(0,0,rSize.getX(),rSize.getY());
if( pSubset )
aBounds.intersect( *pSubset );
@@ -2074,8 +2069,8 @@ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize
IBitmapDeviceDamageTrackerSharedPtr() );
}
-BitmapDeviceSharedPtr subsetBitmapDevice( const BitmapDeviceSharedPtr& rProto,
- const basegfx::B2IRange& rSubset )
+BitmapDeviceSharedPtr subsetBitmapDevice( const BitmapDeviceSharedPtr& rProto,
+ const basegfx::B2IBox& rSubset )
{
return createBitmapDeviceImpl( rProto->getSize(),
rProto->isTopDown(),
@@ -2086,8 +2081,8 @@ BitmapDeviceSharedPtr subsetBitmapDevice( const BitmapDeviceSharedPtr& rProt
rProto->getDamageTracker() );
}
-BitmapDeviceSharedPtr cloneBitmapDevice( const basegfx::B2IVector& rSize,
- const BitmapDeviceSharedPtr& rProto )
+BitmapDeviceSharedPtr cloneBitmapDevice( const basegfx::B2IVector& rSize,
+ const BitmapDeviceSharedPtr& rProto )
{
return createBitmapDeviceImpl( rSize,
rProto->isTopDown(),
diff --git a/basebmp/test/bmpdemo.cxx b/basebmp/test/bmpdemo.cxx
index b3e7096c0da9..4f53c3c5f40e 100644
--- a/basebmp/test/bmpdemo.cxx
+++ b/basebmp/test/bmpdemo.cxx
@@ -56,7 +56,7 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/numeric/ftools.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/vector/b2enums.hxx>
#include <basegfx/point/b2ipoint.hxx>
@@ -1109,7 +1109,7 @@ void TestWindow::Paint( const Rectangle& /*rRect*/ )
basebmp::BitmapDeviceSharedPtr pSubsetDevice =
basebmp::subsetBitmapDevice( pDevice,
- basegfx::B2IRange(3,3,7,7) );
+ basegfx::B2IBox(3,3,7,7) );
const basegfx::B2IPoint aPt1(0,0);
const basegfx::B2IPoint aPt2(1,9);
diff --git a/basebmp/test/bmpmasktest.cxx b/basebmp/test/bmpmasktest.cxx
index 755128b303f1..e44aaeda0c8f 100644
--- a/basebmp/test/bmpmasktest.cxx
+++ b/basebmp/test/bmpmasktest.cxx
@@ -36,7 +36,7 @@
#include "cppunit/extensions/HelperMacros.h"
#include <basegfx/vector/b2isize.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
@@ -67,8 +67,8 @@ private:
rDevice->clear(Color(0));
const Color aCol(0xFFFFFFFF);
- const basegfx::B2IRange aSourceRect(0,0,10,10);
- const basegfx::B2IRange aDestAll(0,0,10,10);
+ const basegfx::B2IBox aSourceRect(0,0,10,10);
+ const basegfx::B2IBox aDestAll(0,0,10,10);
rDevice->drawMaskedBitmap(
rBmp,
@@ -86,8 +86,8 @@ private:
rDevice->clear(Color(0));
const Color aCol(0xFFFFFFFF);
- const basegfx::B2IRange aSourceRect(0,0,10,10);
- const basegfx::B2IRange aDestLeftTop(0,0,6,6);
+ const basegfx::B2IBox aSourceRect(0,0,10,10);
+ const basegfx::B2IBox aDestLeftTop(0,0,6,6);
rDevice->drawMaskedBitmap(
rBmp,
diff --git a/basebmp/test/bmptest.cxx b/basebmp/test/bmptest.cxx
index 6a42c6149f50..65109239e42b 100644
--- a/basebmp/test/bmptest.cxx
+++ b/basebmp/test/bmptest.cxx
@@ -36,7 +36,7 @@
#include "cppunit/extensions/HelperMacros.h"
#include <basegfx/vector/b2isize.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
@@ -66,11 +66,11 @@ private:
rDevice->clear(Color(0));
const Color aCol(0xFFFFFFFF);
- const basegfx::B2IRange aSourceRect(0,0,10,10);
- const basegfx::B2IRange aDestLeftTop(0,0,4,4);
- const basegfx::B2IRange aDestRightTop(6,0,10,4);
- const basegfx::B2IRange aDestLeftBottom(0,6,4,10);
- const basegfx::B2IRange aDestRightBottom(6,6,10,10);
+ const basegfx::B2IBox aSourceRect(0,0,10,10);
+ const basegfx::B2IBox aDestLeftTop(0,0,4,4);
+ const basegfx::B2IBox aDestRightTop(6,0,10,4);
+ const basegfx::B2IBox aDestLeftBottom(0,6,4,10);
+ const basegfx::B2IBox aDestRightBottom(6,6,10,10);
rDevice->drawBitmap(
rBmp,
@@ -111,11 +111,11 @@ private:
rDevice->clear(Color(0));
const Color aCol(0xFFFFFFFF);
- const basegfx::B2IRange aSourceRect(0,0,10,10);
- const basegfx::B2IRange aDestLeftTop(-2,-2,2,2);
- const basegfx::B2IRange aDestRightTop(8,-2,12,2);
- const basegfx::B2IRange aDestLeftBottom(-2,8,2,12);
- const basegfx::B2IRange aDestRightBottom(8,8,12,12);
+ const basegfx::B2IBox aSourceRect(0,0,10,10);
+ const basegfx::B2IBox aDestLeftTop(-2,-2,2,2);
+ const basegfx::B2IBox aDestRightTop(8,-2,12,2);
+ const basegfx::B2IBox aDestLeftBottom(-2,8,2,12);
+ const basegfx::B2IBox aDestRightBottom(8,8,12,12);
rDevice->drawBitmap(
rBmp,
diff --git a/basebmp/test/cliptest.cxx b/basebmp/test/cliptest.cxx
index 08812a9354ce..dd5ff85f44d9 100644
--- a/basebmp/test/cliptest.cxx
+++ b/basebmp/test/cliptest.cxx
@@ -38,7 +38,7 @@
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/range/b2drange.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
@@ -155,8 +155,8 @@ private:
rDevice->clear(aCol1);
rDevice->drawBitmap(pBmp,
- basegfx::B2IRange(0,0,3,3),
- basegfx::B2IRange(-1,-1,4,4),
+ basegfx::B2IBox(0,0,3,3),
+ basegfx::B2IBox(-1,-1,4,4),
DrawMode_PAINT,
mpClipMask);
@@ -183,7 +183,7 @@ private:
aCol,
basebmp::DrawMode_PAINT );
- const basegfx::B2IRange aSourceRect(0,0,10,10);
+ const basegfx::B2IBox aSourceRect(0,0,10,10);
const basegfx::B2IPoint aDestLeftTop(0,0);
const Color aCol2(0xF0F0F0F0);
rDevice->drawMaskedColor(
diff --git a/basebmp/test/masktest.cxx b/basebmp/test/masktest.cxx
index 3847d60c3657..8918a7a53e28 100644
--- a/basebmp/test/masktest.cxx
+++ b/basebmp/test/masktest.cxx
@@ -36,7 +36,7 @@
#include "cppunit/extensions/HelperMacros.h"
#include <basegfx/vector/b2isize.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
@@ -65,7 +65,7 @@ private:
const Color aCol(0);
const Color aCol2(0xF0F0F0F0);
- const basegfx::B2IRange aSourceRect(0,0,10,10);
+ const basegfx::B2IBox aSourceRect(0,0,10,10);
const basegfx::B2IPoint aDestLeftTop(0,0);
const basegfx::B2IPoint aDestRightTop(5,0);
const basegfx::B2IPoint aDestLeftBottom(0,5);
diff --git a/basebmp/test/polytest.cxx b/basebmp/test/polytest.cxx
index 0be253ead882..177557cec565 100644
--- a/basebmp/test/polytest.cxx
+++ b/basebmp/test/polytest.cxx
@@ -36,7 +36,7 @@
#include "cppunit/extensions/HelperMacros.h"
#include <basegfx/vector/b2isize.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -191,7 +191,7 @@ private:
BitmapDeviceSharedPtr pClippedDevice(
subsetBitmapDevice( rDevice,
- basegfx::B2IRange(3,3,5,8) ));
+ basegfx::B2IBox(3,3,5,8) ));
rDevice->clear(aBgCol);
pClippedDevice->fillPolyPolygon(
diff --git a/basegfx/inc/basegfx/tools/canvastools.hxx b/basegfx/inc/basegfx/tools/canvastools.hxx
index d16539f651b7..5884563afd33 100644
--- a/basegfx/inc/basegfx/tools/canvastools.hxx
+++ b/basegfx/inc/basegfx/tools/canvastools.hxx
@@ -70,6 +70,7 @@ namespace basegfx
class B2DPoint;
class B2DRange;
class B3DRange;
+ class B2IBox;
class B2IVector;
class B2IPoint;
class B2IRange;
@@ -206,6 +207,19 @@ namespace basegfx
*/
BASEGFX_DLLPUBLIC ::basegfx::B2IRange b2ISurroundingRangeFromB2DRange( const ::basegfx::B2DRange& rRange );
+ /** Return smalltest integer box, which completely contains
+ given floating point range.
+
+ @param rRange
+ Input range. Values must be within the representable
+ bounds of sal_Int32
+
+ @return the closest integer box, which completely contains
+ rRange. Note that this box will contain all pixel affected
+ by a polygon fill operation over the input range.
+ */
+ BASEGFX_DLLPUBLIC ::basegfx::B2IBox b2ISurroundingBoxFromB2DRange( const ::basegfx::B2DRange& rRange );
+
/** Return smalltest B2DRange with integer values, which
completely contains given floating point range.
diff --git a/basegfx/source/tools/canvastools.cxx b/basegfx/source/tools/canvastools.cxx
index d29d5796389b..896f5615f78f 100644
--- a/basegfx/source/tools/canvastools.cxx
+++ b/basegfx/source/tools/canvastools.cxx
@@ -55,6 +55,7 @@
#include <basegfx/vector/b2isize.hxx>
#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/range/b2irectangle.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/tools/canvastools.hxx>
@@ -597,6 +598,14 @@ namespace basegfx
rRect.Y + rRect.Height );
}
+ ::basegfx::B2IBox b2ISurroundingBoxFromB2DRange( const ::basegfx::B2DRange& rRange )
+ {
+ return ::basegfx::B2IBox( static_cast<sal_Int32>( floor(rRange.getMinX()) ),
+ static_cast<sal_Int32>( floor(rRange.getMinY()) ),
+ static_cast<sal_Int32>( ceil(rRange.getMaxX()) ),
+ static_cast<sal_Int32>( ceil(rRange.getMaxY()) ) );
+ }
+
::basegfx::B2IRange b2ISurroundingRangeFromB2DRange( const ::basegfx::B2DRange& rRange )
{
return ::basegfx::B2IRange( static_cast<sal_Int32>( floor(rRange.getMinX()) ),
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index f385682afada..d27b7654c56f 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -29,7 +29,7 @@
#include "headless/svpbmp.hxx"
#include <basegfx/vector/b2ivector.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basebmp/scanlineformats.hxx>
#include <basebmp/color.hxx>
@@ -96,7 +96,7 @@ bool SvpSalBitmap::Create( const SalBitmap& rSalBmp )
{
B2IVector aSize = rSrcBmp->getSize();
m_aBitmap = cloneBitmapDevice( aSize, rSrcBmp );
- B2IRange aRect( 0, 0, aSize.getX(), aSize.getY() );
+ B2IBox aRect( 0, 0, aSize.getX(), aSize.getY() );
m_aBitmap->drawBitmap( rSrcBmp, aRect, aRect, DrawMode_PAINT );
}
else
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 2a086b33c340..decd04d4f40f 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -31,7 +31,7 @@
#include <vcl/sysdata.hxx>
#include <basegfx/range/b2drange.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
@@ -199,7 +199,7 @@ SvpSalGraphics::ClipUndoHandle::~ClipUndoHandle()
// will avoid setting up the clip bitmap. Similarly if the
// range doesn't appear at all we return true to avoid
// rendering
-bool SvpSalGraphics::isClippedSetup( const basegfx::B2IRange &aRange, SvpSalGraphics::ClipUndoHandle &rUndo )
+bool SvpSalGraphics::isClippedSetup( const basegfx::B2IBox &aRange, SvpSalGraphics::ClipUndoHandle &rUndo )
{
if( m_bClipSetup )
return false;
@@ -244,10 +244,10 @@ bool SvpSalGraphics::isClippedSetup( const basegfx::B2IRange &aRange, SvpSalGrap
// fprintf (stderr, " operation only overlaps with a single clip zone\n" );
rUndo.m_aDevice = m_aDevice;
m_aDevice = basebmp::subsetBitmapDevice( m_aOrigDevice,
- basegfx::B2IRange (aHitRect.Left(),
- aHitRect.Top(),
- aHitRect.Right(),
- aHitRect.Bottom()) );
+ basegfx::B2IBox (aHitRect.Left(),
+ aHitRect.Top(),
+ aHitRect.Right(),
+ aHitRect.Bottom()) );
return false;
}
// fprintf (stderr, "URK: complex & slow clipping case\n" );
@@ -281,7 +281,7 @@ bool SvpSalGraphics::setClipRegion( const Region& i_rClip )
m_aClipMap.reset();
Rectangle aBoundRect( i_rClip.GetBoundRect() );
m_aDevice = basebmp::subsetBitmapDevice( m_aOrigDevice,
- basegfx::B2IRange(aBoundRect.Left(),aBoundRect.Top(),aBoundRect.Right(),aBoundRect.Bottom()) );
+ basegfx::B2IBox(aBoundRect.Left(),aBoundRect.Top(),aBoundRect.Right(),aBoundRect.Bottom()) );
m_bClipSetup = true;
}
else
@@ -531,8 +531,8 @@ void SvpSalGraphics::copyArea( long nDestX,
long nSrcHeight,
sal_uInt16 /*nFlags*/ )
{
- B2IRange aSrcRect( nSrcX, nSrcY, nSrcX+nSrcWidth, nSrcY+nSrcHeight );
- B2IRange aDestRect( nDestX, nDestY, nDestX+nSrcWidth, nDestY+nSrcHeight );
+ B2IBox aSrcRect( nSrcX, nSrcY, nSrcX+nSrcWidth, nSrcY+nSrcHeight );
+ B2IBox aDestRect( nDestX, nDestY, nDestX+nSrcWidth, nDestY+nSrcHeight );
// fprintf( stderr, "copyArea %ld pixels - clip region %d\n",
// (long)(nSrcWidth * nSrcHeight), m_aClipMap.get() != NULL );
SvpSalGraphics::ClipUndoHandle aUndo( this );
@@ -546,12 +546,12 @@ void SvpSalGraphics::copyBits( const SalTwoRect* pPosAry,
{
SvpSalGraphics* pSrc = pSrcGraphics ?
static_cast<SvpSalGraphics*>(pSrcGraphics) : this;
- B2IRange aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
- pPosAry->mnSrcX+pPosAry->mnSrcWidth,
- pPosAry->mnSrcY+pPosAry->mnSrcHeight );
- B2IRange aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
- pPosAry->mnDestX+pPosAry->mnDestWidth,
- pPosAry->mnDestY+pPosAry->mnDestHeight );
+ B2IBox aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
+ pPosAry->mnSrcX+pPosAry->mnSrcWidth,
+ pPosAry->mnSrcY+pPosAry->mnSrcHeight );
+ B2IBox aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
+ pPosAry->mnDestX+pPosAry->mnDestWidth,
+ pPosAry->mnDestY+pPosAry->mnDestHeight );
SvpSalGraphics::ClipUndoHandle aUndo( this );
if( !isClippedSetup( aDestRect, aUndo ) )
@@ -563,12 +563,12 @@ void SvpSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
const SalBitmap& rSalBitmap )
{
const SvpSalBitmap& rSrc = static_cast<const SvpSalBitmap&>(rSalBitmap);
- B2IRange aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
- pPosAry->mnSrcX+pPosAry->mnSrcWidth,
- pPosAry->mnSrcY+pPosAry->mnSrcHeight );
- B2IRange aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
- pPosAry->mnDestX+pPosAry->mnDestWidth,
- pPosAry->mnDestY+pPosAry->mnDestHeight );
+ B2IBox aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
+ pPosAry->mnSrcX+pPosAry->mnSrcWidth,
+ pPosAry->mnSrcY+pPosAry->mnSrcHeight );
+ B2IBox aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
+ pPosAry->mnDestX+pPosAry->mnDestWidth,
+ pPosAry->mnDestY+pPosAry->mnDestHeight );
SvpSalGraphics::ClipUndoHandle aUndo( this );
if( !isClippedSetup( aDestRect, aUndo ) )
@@ -589,12 +589,12 @@ void SvpSalGraphics::drawBitmap( const SalTwoRect* pPosAry,
{
const SvpSalBitmap& rSrc = static_cast<const SvpSalBitmap&>(rSalBitmap);
const SvpSalBitmap& rSrcTrans = static_cast<const SvpSalBitmap&>(rTransparentBitmap);
- B2IRange aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
- pPosAry->mnSrcX+pPosAry->mnSrcWidth,
- pPosAry->mnSrcY+pPosAry->mnSrcHeight );
- B2IRange aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
- pPosAry->mnDestX+pPosAry->mnDestWidth,
- pPosAry->mnDestY+pPosAry->mnDestHeight );
+ B2IBox aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
+ pPosAry->mnSrcX+pPosAry->mnSrcWidth,
+ pPosAry->mnSrcY+pPosAry->mnSrcHeight );
+ B2IBox aDestRect( pPosAry->mnDestX, pPosAry->mnDestY,
+ pPosAry->mnDestX+pPosAry->mnDestWidth,
+ pPosAry->mnDestY+pPosAry->mnDestHeight );
SvpSalGraphics::ClipUndoHandle aUndo( this );
if( !isClippedSetup( aDestRect, aUndo ) )
m_aDevice->drawMaskedBitmap( rSrc.getBitmap(), rSrcTrans.getBitmap(),
@@ -607,9 +607,9 @@ void SvpSalGraphics::drawMask( const SalTwoRect* pPosAry,
SalColor nMaskColor )
{
const SvpSalBitmap& rSrc = static_cast<const SvpSalBitmap&>(rSalBitmap);
- B2IRange aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
- pPosAry->mnSrcX+pPosAry->mnSrcWidth,
- pPosAry->mnSrcY+pPosAry->mnSrcHeight );
+ B2IBox aSrcRect( pPosAry->mnSrcX, pPosAry->mnSrcY,
+ pPosAry->mnSrcX+pPosAry->mnSrcWidth,
+ pPosAry->mnSrcY+pPosAry->mnSrcHeight );
B2IPoint aDestPoint( pPosAry->mnDestX, pPosAry->mnDestY );
// BitmapDevice::drawMaskedColor works with 0==transparent,
@@ -624,8 +624,8 @@ void SvpSalGraphics::drawMask( const SalTwoRect* pPosAry,
aCopy->drawMaskedColor( aFgColor, rSrc.getBitmap(), aSrcRect, B2IPoint() );
basebmp::Color aColor( nMaskColor );
- B2IRange aSrcRect2( 0, 0, pPosAry->mnSrcWidth, pPosAry->mnSrcHeight );
- const B2IRange aClipRect( aDestPoint, B2ITuple( aSrcRect.getWidth(), aSrcRect.getHeight() ) );
+ B2IBox aSrcRect2( 0, 0, pPosAry->mnSrcWidth, pPosAry->mnSrcHeight );
+ const B2IBox aClipRect( aDestPoint, B2ITuple( aSrcRect.getWidth(), aSrcRect.getHeight() ) );
SvpSalGraphics::ClipUndoHandle aUndo( this );
if( !isClippedSetup( aClipRect, aUndo ) )
@@ -638,8 +638,8 @@ SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeigh
BitmapDeviceSharedPtr aCopy =
cloneBitmapDevice( B2IVector( nWidth, nHeight ),
m_aDevice );
- B2IRange aSrcRect( nX, nY, nX+nWidth, nY+nHeight );
- B2IRange aDestRect( 0, 0, nWidth, nHeight );
+ B2IBox aSrcRect( nX, nY, nX+nWidth, nY+nHeight );
+ B2IBox aDestRect( 0, 0, nWidth, nHeight );
SvpSalGraphics::ClipUndoHandle aUndo( this );
if( !isClippedSetup( aDestRect, aUndo ) )
@@ -661,7 +661,7 @@ void SvpSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInv
// FIXME: handle SAL_INVERT_50 and SAL_INVERT_TRACKFRAME
B2DPolygon aRect = tools::createPolygonFromRect( B2DRectangle( nX, nY, nX+nWidth, nY+nHeight ) );
B2DPolyPolygon aPolyPoly( aRect );
- B2IRange aDestRange( nX, nY, nX + nWidth, nY + nHeight );
+ B2IBox aDestRange( nX, nY, nX + nWidth, nY + nHeight );
SvpSalGraphics::ClipUndoHandle aUndo( this );
if( !isClippedSetup( aDestRange, aUndo ) )
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 866a49f70d91..ff649a1ce454 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -27,7 +27,7 @@
************************************************************************/
#include <basegfx/range/b2drange.hxx>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basebmp/scanlineformats.hxx>
@@ -532,8 +532,8 @@ void SvpSalGraphics::DrawServerFontLayout( const ServerFontLayout& rSalLayout )
continue;
// blend text color into target using the glyph's mask
- const B2IRange aSrcRect( B2ITuple(0,0), aAlphaMask->getSize() );
- const B2IRange aClipRect( aDstPoint, aAlphaMask->getSize() );
+ const B2IBox aSrcRect( B2ITuple(0,0), aAlphaMask->getSize() );
+ const B2IBox aClipRect( aDstPoint, aAlphaMask->getSize() );
SvpSalGraphics::ClipUndoHandle aUndo( this );
if( !isClippedSetup( aClipRect, aUndo ) )
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index b08edba55ed0..31ae2530ccc5 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -66,7 +66,7 @@ private:
ClipUndoHandle( SvpSalGraphics *pGfx ) : m_rGfx( *pGfx ) {}
~ClipUndoHandle();
};
- bool isClippedSetup( const basegfx::B2IRange &aRange, ClipUndoHandle &rUndo );
+ bool isClippedSetup( const basegfx::B2IBox &aRange, ClipUndoHandle &rUndo );
void ensureClip();
protected:
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 43f420d895ee..696e08e76ced 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -432,7 +432,7 @@ public:
static GtkSalFrame *getFromWindow( GtkWindow *pWindow );
- virtual void damaged (const basegfx::B2IRange& rDamageRect);
+ virtual void damaged (const basegfx::B2IBox& rDamageRect);
};
#define OOO_TYPE_FIXED ooo_fixed_get_type()
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index cb780e97df92..667b09756ce8 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -56,7 +56,7 @@
#include <svids.hrc>
#include <sal/macros.h>
-#include <basegfx/range/b2irange.hxx>
+#include <basegfx/range/b2ibox.hxx>
#include <basegfx/vector/b2ivector.hxx>
#include <algorithm>
@@ -352,7 +352,7 @@ struct DamageTracker : public basebmp::IBitmapDeviceDamageTracker
{
DamageTracker(GtkSalFrame& rFrame) : m_rFrame(rFrame)
{}
- virtual void damaged(const basegfx::B2IRange& rDamageRect) const
+ virtual void damaged(const basegfx::B2IBox& rDamageRect) const
{
m_rFrame.damaged(rDamageRect);
}
@@ -3014,7 +3014,7 @@ void GtkSalFrame::popIgnoreDamage()
#endif
}
-void GtkSalFrame::damaged (const basegfx::B2IRange& rDamageRect)
+void GtkSalFrame::damaged (const basegfx::B2IBox& rDamageRect)
{
#if !GTK_CHECK_VERSION(3,0,0)
(void)rDamageRect;