diff options
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/bitmap.cxx | 40 | ||||
-rw-r--r-- | vcl/source/outdev/clipping.cxx | 8 | ||||
-rw-r--r-- | vcl/source/outdev/curvedshapes.cxx | 16 | ||||
-rw-r--r-- | vcl/source/outdev/font.cxx | 30 | ||||
-rw-r--r-- | vcl/source/outdev/gradient.cxx | 48 | ||||
-rw-r--r-- | vcl/source/outdev/hatch.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/map.cxx | 38 | ||||
-rw-r--r-- | vcl/source/outdev/mask.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/nativecontrols.cxx | 16 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 16 | ||||
-rw-r--r-- | vcl/source/outdev/rect.cxx | 30 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 28 | ||||
-rw-r--r-- | vcl/source/outdev/textline.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 24 | ||||
-rw-r--r-- | vcl/source/outdev/wallpaper.cxx | 30 |
15 files changed, 166 insertions, 166 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 8593a3f3f7ca..4ae3c84d37ce 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -71,7 +71,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, } if ( RasterOp::Invert == meRasterOp ) { - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); return; } @@ -93,7 +93,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR ); SetLineColor( aCol ); SetFillColor( aCol ); - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); Pop(); return; } @@ -168,7 +168,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, if( mpAlphaVDev ) { // #i32109#: Make bitmap area opaque - mpAlphaVDev->ImplFillOpaqueRectangle( Rectangle(rDestPt, rDestSize) ); + mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, rDestSize) ); } } @@ -181,8 +181,8 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz, if( !aBmp.IsEmpty() ) { Point aPoint; - const Rectangle aBmpRect( aPoint, aBmp.GetSizePixel() ); - Rectangle aSrcRect( rSrcPt, rSrcSz ); + const tools::Rectangle aBmpRect( aPoint, aBmp.GetSizePixel() ); + tools::Rectangle aSrcRect( rSrcPt, rSrcSz ); // do cropping if necessary if( aSrcRect.Intersection( aBmpRect ) != aBmpRect ) @@ -297,7 +297,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, if ( RasterOp::Invert == meRasterOp ) { - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); return; } @@ -394,7 +394,7 @@ Bitmap OutputDevice::GetBitmap( const Point& rSrcPt, const Size& rSize ) const { if ( nWidth > 0 && nHeight > 0 && nX <= (mnOutWidth + mnOutOffX) && nY <= (mnOutHeight + mnOutOffY)) { - Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) ); + tools::Rectangle aRect( Point( nX, nY ), Size( nWidth, nHeight ) ); bool bClipped = false; // X-Coordinate outside of draw area? @@ -552,7 +552,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize // Note the call to ImplPixelToDevicePixel(), since // aPosAry already contains the mnOutOff-offsets, they // also have to be applied to the region - Rectangle aClipRegionBounds( ImplPixelToDevicePixel(maRegion).GetBoundRect() ); + tools::Rectangle aClipRegionBounds( ImplPixelToDevicePixel(maRegion).GetBoundRect() ); // TODO: Also respect scaling (that's a bit tricky, // since the source points have to move fractional @@ -567,7 +567,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize aPosAry.mnDestHeight == aPosAry.mnSrcHeight) { // now intersect dest rect with clip region - aClipRegionBounds.Intersection(Rectangle(aPosAry.mnDestX, + aClipRegionBounds.Intersection(tools::Rectangle(aPosAry.mnDestX, aPosAry.mnDestY, aPosAry.mnDestX + aPosAry.mnDestWidth - 1, aPosAry.mnDestY + aPosAry.mnDestHeight - 1)); @@ -617,7 +617,7 @@ void OutputDevice::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize if (mpAlphaVDev) { // #i32109#: Make bitmap area opaque - mpAlphaVDev->ImplFillOpaqueRectangle( Rectangle(rDestPt, rDestSize) ); + mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, rDestSize) ); } } } @@ -632,7 +632,7 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r Point aOutPt(LogicToPixel(rDestPt)); Size aOutSz(LogicToPixel(rDestSize)); - Rectangle aDstRect(Point(), GetOutputSizePixel()); + tools::Rectangle aDstRect(Point(), GetOutputSizePixel()); const bool bHMirr = aOutSz.Width() < 0; const bool bVMirr = aOutSz.Height() < 0; @@ -651,7 +651,7 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r aOutPt.Y() -= aOutSz.Height() - 1L; } - if (!aDstRect.Intersection(Rectangle(aOutPt, aOutSz)).IsEmpty()) + if (!aDstRect.Intersection(tools::Rectangle(aOutPt, aOutSz)).IsEmpty()) { static const char* pDisableNative = getenv( "SAL_DISABLE_NATIVE_ALPHA"); // #i83087# Naturally, system alpha blending cannot work with @@ -696,8 +696,8 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r #if HAVE_FEATURE_OPENGL assert(!OpenGLHelper::isVCLOpenGLEnabled()); #endif - Rectangle aBmpRect(Point(), rBmp.GetSizePixel()); - if (!aBmpRect.Intersection(Rectangle(rSrcPtPixel, rSrcSizePixel)).IsEmpty()) + tools::Rectangle aBmpRect(Point(), rBmp.GetSizePixel()); + if (!aBmpRect.Intersection(tools::Rectangle(rSrcPtPixel, rSrcSizePixel)).IsEmpty()) { Point auxOutPt(LogicToPixel(rDestPt)); Size auxOutSz(LogicToPixel(rDestSize)); @@ -718,7 +718,7 @@ struct LinearScaleContext std::unique_ptr<long[]> mpMapXOffset; std::unique_ptr<long[]> mpMapYOffset; - LinearScaleContext(Rectangle& aDstRect, Rectangle& aBitmapRect, + LinearScaleContext(tools::Rectangle& aDstRect, tools::Rectangle& aBitmapRect, Size& aOutSize, long nOffX, long nOffY) : mpMapX(new long[aDstRect.GetWidth()]) @@ -882,7 +882,7 @@ struct TradScaleContext std::unique_ptr<long[]> mpMapX; std::unique_ptr<long[]> mpMapY; - TradScaleContext(Rectangle& aDstRect, Rectangle& aBitmapRect, + TradScaleContext(tools::Rectangle& aDstRect, tools::Rectangle& aBitmapRect, Size& aOutSize, long nOffX, long nOffY) : mpMapX(new long[aDstRect.GetWidth()]) @@ -925,7 +925,7 @@ private: } // end anonymous namespace -void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const AlphaMask& rAlpha, Rectangle aDstRect, Rectangle aBmpRect, Size& aOutSize, Point& aOutPoint) +void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const AlphaMask& rAlpha, tools::Rectangle aDstRect, tools::Rectangle aBmpRect, Size& aOutSize, Point& aOutPoint) { assert(!is_double_buffered_window()); @@ -1107,7 +1107,7 @@ bool OutputDevice::TransformAndReduceBitmapExToTargetRange( if(IsClipRegion()) { - const Rectangle aRegionRectangle(GetActiveClipRegion().GetBoundRect()); + const tools::Rectangle aRegionRectangle(GetActiveClipRegion().GetBoundRect()); aOutPixel.intersect( // caution! Range from rectangle, one too much (!) basegfx::B2DRange( @@ -1389,7 +1389,7 @@ Bitmap OutputDevice::BlendBitmapWithAlpha( Bitmap& aBmp, BitmapReadAccess* pP, BitmapReadAccess* pA, - const Rectangle& aDstRect, + const tools::Rectangle& aDstRect, const sal_Int32 nOffY, const sal_Int32 nDstHeight, const sal_Int32 nOffX, @@ -1489,7 +1489,7 @@ Bitmap OutputDevice::BlendBitmap( const sal_Int32 nDstHeight, const sal_Int32 nOffX, const sal_Int32 nDstWidth, - const Rectangle& aBmpRect, + const tools::Rectangle& aBmpRect, const Size& aOutSz, const bool bHMirr, const bool bVMirr, diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx index 9396f262362b..5b6d71d4a3f1 100644 --- a/vcl/source/outdev/clipping.cxx +++ b/vcl/source/outdev/clipping.cxx @@ -103,13 +103,13 @@ void OutputDevice::MoveClipRegion( long nHorzMove, long nVertMove ) mpAlphaVDev->MoveClipRegion( nHorzMove, nVertMove ); } -void OutputDevice::IntersectClipRegion( const Rectangle& rRect ) +void OutputDevice::IntersectClipRegion( const tools::Rectangle& rRect ) { if ( mpMetaFile ) mpMetaFile->AddAction( new MetaISectRectClipRegionAction( rRect ) ); - Rectangle aRect = LogicToPixel( rRect ); + tools::Rectangle aRect = LogicToPixel( rRect ); maRegion.Intersect( aRect ); mbClipRegion = true; mbInitClipRegion = true; @@ -157,7 +157,7 @@ void OutputDevice::InitClipRegion() // Perform actual rect clip against outdev // dimensions, to generate empty clips whenever one of the // values is completely off the device. - Rectangle aDeviceBounds( mnOutOffX, mnOutOffY, + tools::Rectangle aDeviceBounds( mnOutOffX, mnOutOffY, mnOutOffX+GetOutputWidthPixel()-1, mnOutOffY+GetOutputHeightPixel()-1 ); aRegion.Intersect( aDeviceBounds ); @@ -195,7 +195,7 @@ vcl::Region OutputDevice::GetActiveClipRegion() const return GetClipRegion(); } -void OutputDevice::ClipToPaintRegion(Rectangle& /*rDstRect*/) +void OutputDevice::ClipToPaintRegion(tools::Rectangle& /*rDstRect*/) { // this is only used in Window, but we still need it as it's called // on in other clipping functions diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx index 3c931c87f2f5..675543f04197 100644 --- a/vcl/source/outdev/curvedshapes.cxx +++ b/vcl/source/outdev/curvedshapes.cxx @@ -25,7 +25,7 @@ #include <salgdi.hxx> -void OutputDevice::DrawEllipse( const Rectangle& rRect ) +void OutputDevice::DrawEllipse( const tools::Rectangle& rRect ) { assert(!is_double_buffered_window()); @@ -35,7 +35,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect ) if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -72,7 +72,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect ) mpAlphaVDev->DrawEllipse( rRect ); } -void OutputDevice::DrawArc( const Rectangle& rRect, +void OutputDevice::DrawArc( const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ) { assert(!is_double_buffered_window()); @@ -83,7 +83,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect, if ( !IsDeviceOutputNecessary() || !mbLineColor || ImplIsRecordLayout() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -116,7 +116,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect, mpAlphaVDev->DrawArc( rRect, rStartPt, rEndPt ); } -void OutputDevice::DrawPie( const Rectangle& rRect, +void OutputDevice::DrawPie( const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ) { assert(!is_double_buffered_window()); @@ -127,7 +127,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect, if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -167,7 +167,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect, mpAlphaVDev->DrawPie( rRect, rStartPt, rEndPt ); } -void OutputDevice::DrawChord( const Rectangle& rRect, +void OutputDevice::DrawChord( const tools::Rectangle& rRect, const Point& rStartPt, const Point& rEndPt ) { assert(!is_double_buffered_window()); @@ -178,7 +178,7 @@ void OutputDevice::DrawChord( const Rectangle& rRect, if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index a28fba0c0220..554bec061e50 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -287,7 +287,7 @@ SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const #endif // ENABLE_CAIRO_CANVAS void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPolyLine, - Rectangle& rRect1, Rectangle& rRect2, + tools::Rectangle& rRect1, tools::Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short /*nOrient*/ ) @@ -349,7 +349,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo if ( !nDotSize ) nDotSize = 1; if ( nDotSize <= 2 ) - rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) ); + rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) ); else { long nRad = nDotSize/2; @@ -366,7 +366,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo if ( !nDotSize ) nDotSize = 1; if ( nDotSize <= 2 ) - rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) ); + rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) ); else { long nRad = nDotSize/2; @@ -392,7 +392,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo if ( !nDotSize ) nDotSize = 1; if ( nDotSize <= 2 ) - rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) ); + rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) ); else { long nRad = nDotSize/2; @@ -411,13 +411,13 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo { if ( nDotSize == 1 ) { - rRect1 = Rectangle( Point(), Size( nDotSize, nDotSize ) ); + rRect1 = tools::Rectangle( Point(), Size( nDotSize, nDotSize ) ); rWidth = nDotSize; } else { - rRect1 = Rectangle( Point(), Size( 1, 1 ) ); - rRect2 = Rectangle( Point( 1, 1 ), Size( 1, 1 ) ); + rRect1 = tools::Rectangle( Point(), Size( 1, 1 ) ); + rRect2 = tools::Rectangle( Point( 1, 1 ), Size( 1, 1 ) ); } } else @@ -429,7 +429,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo aPoly.Scale( dScale, dScale ); tools::Polygon aTemp; aPoly.AdaptiveSubdivide( aTemp ); - Rectangle aBoundRect = aTemp.GetBoundRect(); + tools::Rectangle aBoundRect = aTemp.GetBoundRect(); rWidth = aBoundRect.GetWidth(); nDotSize = aBoundRect.GetHeight(); rPolyPoly.Insert( aTemp ); @@ -1193,7 +1193,7 @@ void OutputDevice::SetFontOrientation( LogicalFontInstance* const pFontInstance void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, - const Rectangle& rRect1, const Rectangle& rRect2 ) + const tools::Rectangle& rRect1, const tools::Rectangle& rRect2 ) { if( IsRTLEnabled() ) // --- RTL --- mirror at basex @@ -1220,14 +1220,14 @@ void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY, if ( !rRect1.IsEmpty() ) { - Rectangle aRect( Point( nX+rRect1.Left(), + tools::Rectangle aRect( Point( nX+rRect1.Left(), nY+rRect1.Top() ), rRect1.GetSize() ); DrawRect( aRect ); } if ( !rRect2.IsEmpty() ) { - Rectangle aRect( Point( nX+rRect2.Left(), + tools::Rectangle aRect( Point( nX+rRect2.Left(), nY+rRect2.Top() ), rRect2.GetSize() ); DrawRect( aRect ); @@ -1245,8 +1245,8 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont ); tools::PolyPolygon aPolyPoly; - Rectangle aRect1; - Rectangle aRect2; + tools::Rectangle aRect1; + tools::Rectangle aRect2; long nEmphasisYOff; long nEmphasisWidth; long nEmphasisHeight; @@ -1286,7 +1286,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) aOffset += Point( nEmphasisWidth2, nEmphasisHeight2 ); Point aOutPoint; - Rectangle aRectangle; + tools::Rectangle aRectangle; const GlyphItem* pGlyph; int nStart = 0; while (rSalLayout.GetNextGlyphs(1, &pGlyph, aOutPoint, nStart)) @@ -1477,7 +1477,7 @@ bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rSt nLen = rStr.getLength() - nIndex; } - Rectangle aRect; + tools::Rectangle aRect; for( int i = 0; i < nLen; i++ ) { if( !GetTextBoundRect( aRect, rStr, nIndex, nIndex + i, 1 ) ) diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 7c14e0a7b149..24e7e098f2e7 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -31,7 +31,7 @@ #define GRADIENT_DEFAULT_STEPCOUNT 0 -void OutputDevice::DrawGradient( const Rectangle& rRect, +void OutputDevice::DrawGradient( const tools::Rectangle& rRect, const Gradient& rGradient ) { assert(!is_double_buffered_window()); @@ -84,12 +84,12 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, return; // Clip and then draw the gradient - if( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) + if( !tools::Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) { - const Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); // convert rectangle to pixels - Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) ); aRect.Justify(); // do nothing if the rectangle is empty @@ -155,7 +155,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, void OutputDevice::ClipAndDrawGradientMetafile ( const Gradient &rGradient, const tools::PolyPolygon &rPolyPoly ) { - const Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); const bool bOldOutput = IsOutputEnabled(); EnableOutput( false ); @@ -188,7 +188,7 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly, SetGrayscaleColors( aGradient ); } - const Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); + const tools::Rectangle aBoundRect( rPolyPoly.GetBoundRect() ); if ( rPolyPoly.IsRect() ) { @@ -208,10 +208,10 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly, return; // Clip and then draw the gradient - if( !Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) + if( !tools::Rectangle( PixelToLogic( Point() ), GetOutputSize() ).IsEmpty() ) { // convert rectangle to pixels - Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( aBoundRect ) ); aRect.Justify(); // do nothing if the rectangle is empty @@ -258,14 +258,14 @@ namespace } } -void OutputDevice::DrawLinearGradient( const Rectangle& rRect, +void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClixPolyPoly ) { assert(!is_double_buffered_window()); // get BoundRect of rotated rectangle - Rectangle aRect; + tools::Rectangle aRect; Point aCenter; sal_uInt16 nAngle = rGradient.GetAngle() % 3600; @@ -277,7 +277,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect, { fBorder /= 2.0; } - Rectangle aMirrorRect = aRect; // used in style axial + tools::Rectangle aMirrorRect = aRect; // used in style axial aMirrorRect.Top() = ( aRect.Top() + aRect.Bottom() ) / 2; if ( !bLinear ) { @@ -322,7 +322,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect, sal_uInt8 nBlue; // Create border - Rectangle aBorderRect = aRect; + tools::Rectangle aBorderRect = aRect; tools::Polygon aPoly( 4 ); if (fBorder > 0.0) { @@ -446,7 +446,7 @@ bool OutputDevice::is_double_buffered_window() const return pWindow && pWindow->SupportsDoubleBuffering(); } -void OutputDevice::DrawComplexGradient( const Rectangle& rRect, +void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClixPolyPoly ) { @@ -459,7 +459,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, // can print polygons on top of each other. std::unique_ptr<tools::PolyPolygon> xPolyPoly; - Rectangle aRect; + tools::Rectangle aRect; Point aCenter; Color aStartCol( rGradient.GetStartColor() ); Color aEndCol( rGradient.GetEndColor() ); @@ -527,7 +527,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, else { // extend rect, to avoid missing bounding line - Rectangle aExtRect( rRect ); + tools::Rectangle aExtRect( rRect ); aExtRect.Left() -= 1; aExtRect.Top() -= 1; @@ -613,13 +613,13 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect, } } -void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect, +void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient ) { assert(!is_double_buffered_window()); // get BoundRect of rotated rectangle - Rectangle aRect; + tools::Rectangle aRect; Point aCenter; sal_uInt16 nAngle = rGradient.GetAngle() % 3600; @@ -631,7 +631,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect, { fBorder /= 2.0; } - Rectangle aMirrorRect = aRect; // used in style axial + tools::Rectangle aMirrorRect = aRect; // used in style axial aMirrorRect.Top() = ( aRect.Top() + aRect.Bottom() ) / 2; if ( !bLinear ) { @@ -676,7 +676,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect, sal_uInt8 nBlue; // Create border - Rectangle aBorderRect = aRect; + tools::Rectangle aBorderRect = aRect; tools::Polygon aPoly( 4 ); if (fBorder > 0.0) { @@ -793,7 +793,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect, } } -void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect, +void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect, const Gradient& rGradient ) { assert(!is_double_buffered_window()); @@ -805,7 +805,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect, // can print polygons on top of each other. std::unique_ptr<tools::PolyPolygon> xPolyPoly; - Rectangle aRect; + tools::Rectangle aRect; Point aCenter; Color aStartCol( rGradient.GetStartColor() ); Color aEndCol( rGradient.GetEndColor() ); @@ -934,7 +934,7 @@ long OutputDevice::GetGradientStepCount( long nMinRect ) return nInc; } -long OutputDevice::GetGradientSteps( const Gradient& rGradient, const Rectangle& rRect, bool bMtf, bool bComplex ) +long OutputDevice::GetGradientSteps( const Gradient& rGradient, const tools::Rectangle& rRect, bool bMtf, bool bComplex ) { // calculate step count long nStepCount = rGradient.GetSteps(); @@ -1013,11 +1013,11 @@ void OutputDevice::SetGrayscaleColors( Gradient &rGradient ) rGradient.SetEndColor( aEndCol ); } -void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& rGradient, +void OutputDevice::AddGradientActions( const tools::Rectangle& rRect, const Gradient& rGradient, GDIMetaFile& rMtf ) { - Rectangle aRect( rRect ); + tools::Rectangle aRect( rRect ); aRect.Justify(); diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx index 39312eabea63..f0712911f637 100644 --- a/vcl/source/outdev/hatch.cxx +++ b/vcl/source/outdev/hatch.cxx @@ -166,7 +166,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& } else { - Rectangle aRect( rPolyPoly.GetBoundRect() ); + tools::Rectangle aRect( rPolyPoly.GetBoundRect() ); const long nLogPixelWidth = ImplDevicePixelToLogicWidth( 1 ); const long nWidth = ImplDevicePixelToLogicWidth( std::max( ImplLogicWidthToDevicePixel( rHatch.GetDistance() ), 3L ) ); std::unique_ptr<Point[]> pPtBuffer(new Point[ HATCH_MAXPOINTS ]); @@ -213,7 +213,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& } } -void OutputDevice::CalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10, +void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 ) { Point aRef; diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 72d5f928d914..c2c65b341ece 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -511,18 +511,18 @@ Size OutputDevice::ImplLogicToDevicePixel( const Size& rLogicSize ) const maThresRes.mnThresLogToPixY ) ); } -Rectangle OutputDevice::ImplLogicToDevicePixel( const Rectangle& rLogicRect ) const +tools::Rectangle OutputDevice::ImplLogicToDevicePixel( const tools::Rectangle& rLogicRect ) const { if ( rLogicRect.IsEmpty() ) return rLogicRect; if ( !mbMap ) { - return Rectangle( rLogicRect.Left()+mnOutOffX, rLogicRect.Top()+mnOutOffY, + return tools::Rectangle( rLogicRect.Left()+mnOutOffX, rLogicRect.Top()+mnOutOffY, rLogicRect.Right()+mnOutOffX, rLogicRect.Bottom()+mnOutOffY ); } - return Rectangle( ImplLogicToPixel( rLogicRect.Left()+maMapRes.mnMapOfsX, mnDPIX, + return tools::Rectangle( ImplLogicToPixel( rLogicRect.Left()+maMapRes.mnMapOfsX, mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX, maThresRes.mnThresLogToPixX )+mnOutOffX+mnOutOffOrigX, ImplLogicToPixel( rLogicRect.Top()+maMapRes.mnMapOfsY, mnDPIY, @@ -619,18 +619,18 @@ LineInfo OutputDevice::ImplLogicToDevicePixel( const LineInfo& rLineInfo ) const return aInfo; } -Rectangle OutputDevice::ImplDevicePixelToLogic( const Rectangle& rPixelRect ) const +tools::Rectangle OutputDevice::ImplDevicePixelToLogic( const tools::Rectangle& rPixelRect ) const { if ( rPixelRect.IsEmpty() ) return rPixelRect; if ( !mbMap ) { - return Rectangle( rPixelRect.Left()-mnOutOffX, rPixelRect.Top()-mnOutOffY, + return tools::Rectangle( rPixelRect.Left()-mnOutOffX, rPixelRect.Top()-mnOutOffY, rPixelRect.Right()-mnOutOffX, rPixelRect.Bottom()-mnOutOffY ); } - return Rectangle( ImplPixelToLogic( rPixelRect.Left()-mnOutOffX-mnOutOffOrigX, mnDPIX, + return tools::Rectangle( ImplPixelToLogic( rPixelRect.Left()-mnOutOffX-mnOutOffOrigX, mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX, maThresRes.mnThresPixToLogX )-maMapRes.mnMapOfsX, ImplPixelToLogic( rPixelRect.Top()-mnOutOffY-mnOutOffOrigY, mnDPIY, @@ -985,13 +985,13 @@ Size OutputDevice::LogicToPixel( const Size& rLogicSize ) const maThresRes.mnThresLogToPixY ) ); } -Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect ) const +tools::Rectangle OutputDevice::LogicToPixel( const tools::Rectangle& rLogicRect ) const { if ( !mbMap || rLogicRect.IsEmpty() ) return rLogicRect; - return Rectangle( ImplLogicToPixel( rLogicRect.Left() + maMapRes.mnMapOfsX, mnDPIX, + return tools::Rectangle( ImplLogicToPixel( rLogicRect.Left() + maMapRes.mnMapOfsX, mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX, maThresRes.mnThresLogToPixX )+mnOutOffOrigX, ImplLogicToPixel( rLogicRect.Top() + maMapRes.mnMapOfsY, mnDPIY, @@ -1132,7 +1132,7 @@ Size OutputDevice::LogicToPixel( const Size& rLogicSize, aThresRes.mnThresLogToPixY ) ); } -Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect, +tools::Rectangle OutputDevice::LogicToPixel( const tools::Rectangle& rLogicRect, const MapMode& rMapMode ) const { @@ -1144,7 +1144,7 @@ Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect, ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); - return Rectangle( ImplLogicToPixel( rLogicRect.Left() + aMapRes.mnMapOfsX, mnDPIX, + return tools::Rectangle( ImplLogicToPixel( rLogicRect.Left() + aMapRes.mnMapOfsX, mnDPIX, aMapRes.mnMapScNumX, aMapRes.mnMapScDenomX, aThresRes.mnThresLogToPixX )+mnOutOffOrigX, ImplLogicToPixel( rLogicRect.Top() + aMapRes.mnMapOfsY, mnDPIY, @@ -1230,13 +1230,13 @@ Size OutputDevice::PixelToLogic( const Size& rDeviceSize ) const maThresRes.mnThresPixToLogY ) ); } -Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect ) const +tools::Rectangle OutputDevice::PixelToLogic( const tools::Rectangle& rDeviceRect ) const { if ( !mbMap || rDeviceRect.IsEmpty() ) return rDeviceRect; - return Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX, + return tools::Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX, maThresRes.mnThresPixToLogX ) - maMapRes.mnMapOfsX - mnOutOffLogicX, ImplPixelToLogic( rDeviceRect.Top(), mnDPIY, @@ -1379,7 +1379,7 @@ Size OutputDevice::PixelToLogic( const Size& rDeviceSize, aThresRes.mnThresPixToLogY ) ); } -Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect, +tools::Rectangle OutputDevice::PixelToLogic( const tools::Rectangle& rDeviceRect, const MapMode& rMapMode ) const { @@ -1392,7 +1392,7 @@ Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect, ImplThresholdRes aThresRes; ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes ); - return Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX, + return tools::Rectangle( ImplPixelToLogic( rDeviceRect.Left(), mnDPIX, aMapRes.mnMapScNumX, aMapRes.mnMapScDenomX, aThresRes.mnThresPixToLogX ) - aMapRes.mnMapOfsX - mnOutOffLogicX, ImplPixelToLogic( rDeviceRect.Top(), mnDPIY, @@ -1735,13 +1735,13 @@ Size OutputDevice::LogicToLogic( const Size& rSzSource, aMapResSource.mnMapScDenomY, aMapResDest.mnMapScNumY ) ); } -Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource, +tools::Rectangle OutputDevice::LogicToLogic( const tools::Rectangle& rRectSource, const MapMode* pMapModeSource, const MapMode* pMapModeDest ) const { ENTER1( rRectSource, pMapModeSource, pMapModeDest ); - return Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX, + return tools::Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX, aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX, aMapResSource.mnMapScDenomX, aMapResDest.mnMapScNumX ) - aMapResDest.mnMapOfsX, @@ -1878,7 +1878,7 @@ basegfx::B2DHomMatrix OutputDevice::LogicToLogic(const MapMode& rMapModeSource, return aTransform; } -Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource, +tools::Rectangle OutputDevice::LogicToLogic( const tools::Rectangle& rRectSource, const MapMode& rMapModeSource, const MapMode& rMapModeDest ) { @@ -1893,7 +1893,7 @@ Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource, { ENTER3( eUnitSource, eUnitDest ); - return Rectangle( fn3( rRectSource.Left(), nNumerator, nDenominator ), + return tools::Rectangle( fn3( rRectSource.Left(), nNumerator, nDenominator ), fn3( rRectSource.Top(), nNumerator, nDenominator ), fn3( rRectSource.Right(), nNumerator, nDenominator ), fn3( rRectSource.Bottom(), nNumerator, nDenominator ) ); @@ -1902,7 +1902,7 @@ Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource, { ENTER4( rMapModeSource, rMapModeDest ); - return Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX, + return tools::Rectangle( fn5( rRectSource.Left() + aMapResSource.mnMapOfsX, aMapResSource.mnMapScNumX, aMapResDest.mnMapScDenomX, aMapResSource.mnMapScDenomX, aMapResDest.mnMapScNumX ) - aMapResDest.mnMapOfsX, diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx index 73af2869fff0..5ce47c676e84 100644 --- a/vcl/source/outdev/mask.cxx +++ b/vcl/source/outdev/mask.cxx @@ -56,7 +56,7 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize, if( RasterOp::Invert == meRasterOp ) { - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); return; } diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx index 01bcb85f78a3..5dc1fd8c417d 100644 --- a/vcl/source/outdev/nativecontrols.cxx +++ b/vcl/source/outdev/nativecontrols.cxx @@ -170,7 +170,7 @@ bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPar bool OutputDevice::HitTestNativeScrollbar( ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) const { @@ -182,7 +182,7 @@ bool OutputDevice::HitTestNativeScrollbar( return false; Point aWinOffs( mnOutOffX, mnOutOffY ); - Rectangle screenRegion( rControlRegion ); + tools::Rectangle screenRegion( rControlRegion ); screenRegion.Move( aWinOffs.X(), aWinOffs.Y()); return mpGraphics->HitTestNativeScrollbar( nPart, screenRegion, Point( aPos.X() + mnOutOffX, aPos.Y() + mnOutOffY ), @@ -270,7 +270,7 @@ static std::shared_ptr< ImplControlValue > TransformControlValue( const ImplCont } bool OutputDevice::DrawNativeControl( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption ) @@ -298,7 +298,7 @@ bool OutputDevice::DrawNativeControl( ControlType nType, // Convert the coordinates from relative to Window-absolute, so we draw // in the correct place in platform code std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) ); - Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); + tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); vcl::Region aTestRegion( GetActiveClipRegion() ); aTestRegion.Intersect( rControlRegion ); @@ -315,12 +315,12 @@ bool OutputDevice::DrawNativeControl( ControlType nType, bool OutputDevice::GetNativeControlRegion( ControlType nType, ControlPart nPart, - const Rectangle& rControlRegion, + const tools::Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion ) const + tools::Rectangle &rNativeBoundingRegion, + tools::Rectangle &rNativeContentRegion ) const { if( !EnableNativeWidget( *this ) ) return false; @@ -332,7 +332,7 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType, // Convert the coordinates from relative to Window-absolute, so we draw // in the correct place in platform code std::shared_ptr< ImplControlValue > aScreenCtrlValue( TransformControlValue( aValue, *this ) ); - Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); + tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, rNativeBoundingRegion, diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index c4be8b67f630..31449f224342 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -419,7 +419,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, if ( RasterOp::Invert == meRasterOp ) { - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); return; } @@ -454,7 +454,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, ImplLogicXToDevicePixel(rDestPt.X()), ImplLogicYToDevicePixel(rDestPt.Y()), nDestWidth, nDestHeight); - const Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ), + const tools::Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); AdjustTwoRect( aPosAry, aSrcOutRect ); @@ -476,7 +476,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, if ( RasterOp::Invert == meRasterOp ) { - DrawRect( Rectangle( rDestPt, rDestSize ) ); + DrawRect( tools::Rectangle( rDestPt, rDestSize ) ); return; } @@ -520,7 +520,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize, drawOutDevDirect( &rOutDev, aPosAry ); // #i32109#: make destination rectangle opaque - source has no alpha - mpAlphaVDev->ImplFillOpaqueRectangle( Rectangle(rDestPt, rDestSize) ); + mpAlphaVDev->ImplFillOpaqueRectangle( tools::Rectangle(rDestPt, rDestSize) ); } } else @@ -570,7 +570,7 @@ void OutputDevice::CopyArea( const Point& rDestPt, ImplLogicXToDevicePixel(rDestPt.X()), ImplLogicYToDevicePixel(rDestPt.Y()), nSrcWidth, nSrcHeight); - const Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ), + const tools::Rectangle aSrcOutRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); AdjustTwoRect( aPosAry, aSrcOutRect ); @@ -641,7 +641,7 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP } // #102532# Offset only has to be pseudo window offset - const Rectangle aSrcOutRect( Point( pSrcDev->mnOutOffX, pSrcDev->mnOutOffY ), + const tools::Rectangle aSrcOutRect( Point( pSrcDev->mnOutOffX, pSrcDev->mnOutOffY ), Size( pSrcDev->mnOutWidth, pSrcDev->mnOutHeight ) ); AdjustTwoRect( rPosAry, aSrcOutRect ); @@ -693,7 +693,7 @@ void OutputDevice::ReMirror( Point &rPoint ) const { rPoint.X() = mnOutOffX + mnOutWidth - 1 - rPoint.X() + mnOutOffX; } -void OutputDevice::ReMirror( Rectangle &rRect ) const +void OutputDevice::ReMirror( tools::Rectangle &rRect ) const { long nWidth = rRect.Right() - rRect.Left(); @@ -754,7 +754,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize, if( mbOutputClipped ) return bDrawn; - Rectangle aRect( ImplLogicToDevicePixel( Rectangle( rPoint, rSize ) ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( tools::Rectangle( rPoint, rSize ) ) ); if( !aRect.IsEmpty() ) { diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index 61cbeaa4f4af..30ca92c1f7db 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -30,7 +30,7 @@ #include "salgdi.hxx" -void OutputDevice::DrawRect( const Rectangle& rRect ) +void OutputDevice::DrawRect( const tools::Rectangle& rRect ) { assert(!is_double_buffered_window()); @@ -40,7 +40,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect ) if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -68,7 +68,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect ) mpAlphaVDev->DrawRect( rRect ); } -void OutputDevice::DrawRect( const Rectangle& rRect, +void OutputDevice::DrawRect( const tools::Rectangle& rRect, sal_uLong nHorzRound, sal_uLong nVertRound ) { assert(!is_double_buffered_window()); @@ -79,7 +79,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect, if ( !IsDeviceOutputNecessary() || (!mbLineColor && !mbFillColor) || ImplIsRecordLayout() ) return; - const Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + const tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -129,13 +129,13 @@ void OutputDevice::DrawRect( const Rectangle& rRect, mpAlphaVDev->DrawRect( rRect, nHorzRound, nVertRound ); } -void OutputDevice::Invert( const Rectangle& rRect, InvertFlags nFlags ) +void OutputDevice::Invert( const tools::Rectangle& rRect, InvertFlags nFlags ) { assert(!is_double_buffered_window()); if ( !IsDeviceOutputNecessary() ) return; - Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); + tools::Rectangle aRect( ImplLogicToDevicePixel( rRect ) ); if ( aRect.IsEmpty() ) return; @@ -218,18 +218,18 @@ void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt3 const sal_uInt32 nBottom(std::min(nMaxY, nY + nLen)); SetFillColor(((x & 0x0001) ^ (y & 0x0001)) ? aStart : aEnd); - DrawRect(Rectangle(nX, nY, nRight, nBottom)); + DrawRect(tools::Rectangle(nX, nY, nRight, nBottom)); } } Pop(); } -void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags ) +void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, DrawGridFlags nFlags ) { assert(!is_double_buffered_window()); - Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() ); + tools::Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() ); aDstRect.Intersection( rRect ); if( aDstRect.IsEmpty() || ImplIsRecordLayout() ) @@ -351,11 +351,11 @@ BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix ) ( ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) > rSizePix.Width() ) || ( ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) > rSizePix.Height() ) ) { - const Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ), + const tools::Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ), Size( rTwoRect.mnSrcWidth, rTwoRect.mnSrcHeight ) ); - Rectangle aCropRect( aSourceRect ); + tools::Rectangle aCropRect( aSourceRect ); - aCropRect.Intersection( Rectangle( Point(), rSizePix ) ); + aCropRect.Intersection( tools::Rectangle( Point(), rSizePix ) ); if( aCropRect.IsEmpty() ) { @@ -385,16 +385,16 @@ BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix ) return nMirrFlags; } -void AdjustTwoRect( SalTwoRect& rTwoRect, const Rectangle& rValidSrcRect ) +void AdjustTwoRect( SalTwoRect& rTwoRect, const tools::Rectangle& rValidSrcRect ) { if( ( rTwoRect.mnSrcX < rValidSrcRect.Left() ) || ( rTwoRect.mnSrcX >= rValidSrcRect.Right() ) || ( rTwoRect.mnSrcY < rValidSrcRect.Top() ) || ( rTwoRect.mnSrcY >= rValidSrcRect.Bottom() ) || ( ( rTwoRect.mnSrcX + rTwoRect.mnSrcWidth ) > rValidSrcRect.Right() ) || ( ( rTwoRect.mnSrcY + rTwoRect.mnSrcHeight ) > rValidSrcRect.Bottom() ) ) { - const Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ), + const tools::Rectangle aSourceRect( Point( rTwoRect.mnSrcX, rTwoRect.mnSrcY ), Size( rTwoRect.mnSrcWidth, rTwoRect.mnSrcHeight ) ); - Rectangle aCropRect( aSourceRect ); + tools::Rectangle aCropRect( aSourceRect ); aCropRect.Intersection( rValidSrcRect ); diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index ad835c29dbf5..5cf1ca62fd74 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -132,7 +132,7 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY, nX += nBaseX; nY += nBaseY; // inflate because polygons are drawn smaller - Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) ); + tools::Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) ); tools::Polygon aPoly( aRect ); aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontInstance->mnOrientation ); ImplDrawPolygon( aPoly ); @@ -166,7 +166,7 @@ void OutputDevice::ImplDrawTextBackground( const SalLayout& rSalLayout ) mpFontInstance->mnLineHeight+mnEmphasisAscent+mnEmphasisDescent ); } -Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout ) +tools::Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout ) { Point aPoint = rSalLayout.GetDrawPosition(); long nX = aPoint.X(); @@ -194,14 +194,14 @@ Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout ) else { // inflate by +1+1 because polygons are drawn smaller - Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) ); + tools::Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) ); tools::Polygon aPoly( aRect ); aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontInstance->mnOrientation ); return aPoly.GetBoundRect(); } } - return Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); + return tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); } bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) @@ -209,7 +209,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) long nX = rSalLayout.DrawBase().X(); long nY = rSalLayout.DrawBase().Y(); - Rectangle aBoundRect; + tools::Rectangle aBoundRect; rSalLayout.DrawBase() = Point( 0, 0 ); rSalLayout.DrawOffset() = Point( 0, 0 ); if( !rSalLayout.GetBoundRect( *mpGraphics, aBoundRect ) ) @@ -218,7 +218,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) long nRight = rSalLayout.GetTextWidth(); long nTop = mpFontInstance->mxFontMetric->GetAscent() + mnEmphasisAscent; long nHeight = mpFontInstance->mnLineHeight + mnEmphasisAscent + mnEmphasisDescent; - aBoundRect = Rectangle( 0, -nTop, nRight, nHeight - nTop ); + aBoundRect = tools::Rectangle( 0, -nTop, nRight, nHeight - nTop ); } // cache virtual device for rotation @@ -829,7 +829,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr, { vcl::Region aClip( GetClipRegion() ); if( meOutDevType == OUTDEV_WINDOW ) - aClip.Intersect( Rectangle( Point(), GetOutputSize() ) ); + aClip.Intersect( tools::Rectangle( Point(), GetOutputSize() ) ); if (mpOutDevData->mpRecordLayout) { mpOutDevData->mpRecordLayout->m_aLineIndices.push_back( mpOutDevData->mpRecordLayout->m_aDisplayText.getLength() ); @@ -1465,7 +1465,7 @@ sal_Int32 OutputDevice::GetTextBreak( const OUString& rStr, long nTextWidth, return nRetVal; } -void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect, +void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, MetricVector* pVector, OUString* pDisplayText, vcl::ITextLayout& _rLayout ) @@ -1730,7 +1730,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r } } -void OutputDevice::AddTextRectActions( const Rectangle& rRect, +void OutputDevice::AddTextRectActions( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, GDIMetaFile& rMtf ) @@ -1763,7 +1763,7 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect, mpMetaFile = pMtf; } -void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, +void OutputDevice::DrawText( const tools::Rectangle& rRect, const OUString& rOrigStr, DrawTextFlags nStyle, MetricVector* pVector, OUString* pDisplayText, vcl::ITextLayout* _pTextLayout ) { @@ -1808,13 +1808,13 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, D mpAlphaVDev->DrawText( rRect, rOrigStr, nStyle, pVector, pDisplayText ); } -Rectangle OutputDevice::GetTextRect( const Rectangle& rRect, +tools::Rectangle OutputDevice::GetTextRect( const tools::Rectangle& rRect, const OUString& rStr, DrawTextFlags nStyle, TextRectInfo* pInfo, const vcl::ITextLayout* _pTextLayout ) const { - Rectangle aRect = rRect; + tools::Rectangle aRect = rRect; sal_Int32 nLines; long nWidth = rRect.GetWidth(); long nMaxWidth; @@ -2332,7 +2332,7 @@ SystemTextLayoutData OutputDevice::GetSysTextLayoutData(const Point& rStartPt, c return aSysLayoutData; } -bool OutputDevice::GetTextBoundRect( Rectangle& rRect, +bool OutputDevice::GetTextBoundRect( tools::Rectangle& rRect, const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen, sal_uLong nLayoutWidth, const long* pDXAry ) const @@ -2361,7 +2361,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect, } pSalLayout = ImplLayout( rStr, nIndex, nLen, aPoint, nLayoutWidth, pDXAry ); - Rectangle aPixelRect; + tools::Rectangle aPixelRect; if( pSalLayout ) { bRet = pSalLayout->GetBoundRect( *mpGraphics, aPixelRect ); diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index ba974d525b63..409f4fc108d4 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -644,7 +644,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY, pLayout->DrawBase() = Point( nBaseX+mnTextOffX, nBaseY+mnTextOffY ); - Rectangle aPixelRect; + tools::Rectangle aPixelRect; aPixelRect.Left() = nBaseX+mnTextOffX; aPixelRect.Right() = aPixelRect.Left()+nWidth; aPixelRect.Bottom() = nBaseY+mpFontInstance->mxFontMetric->GetDescent(); diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index c1c3a639bff1..91dfec3b24cc 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -119,7 +119,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask { Point aDestPt( LogicToPixel( rDestPt ) ); Size aDestSz( LogicToPixel( rDestSize ) ); - Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel ); + tools::Rectangle aSrcRect( rSrcPtPixel, rSrcSizePixel ); aSrcRect.Justify(); @@ -148,7 +148,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask } // source cropped? - if( aSrcRect != Rectangle( Point(), aPaint.GetSizePixel() ) ) + if( aSrcRect != tools::Rectangle( Point(), aPaint.GetSizePixel() ) ) { aPaint.Crop( aSrcRect ); aMask.Crop( aSrcRect ); @@ -185,7 +185,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight ); // walk through all rectangles of mask - const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, Rectangle(Point(), aMask.GetSizePixel()))); + const vcl::Region aWorkRgn(aMask.CreateRegion(COL_BLACK, tools::Rectangle(Point(), aMask.GetSizePixel()))); RectangleVector aRectangles; aWorkRgn.GetRegionRectangles(aRectangles); @@ -389,9 +389,9 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, mpMetaFile = nullptr; tools::PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) ); - Rectangle aPolyRect( aPolyPoly.GetBoundRect() ); + tools::Rectangle aPolyRect( aPolyPoly.GetBoundRect() ); Point aPoint; - Rectangle aDstRect( aPoint, GetOutputSizePixel() ); + tools::Rectangle aDstRect( aPoint, GetOutputSizePixel() ); aDstRect.Intersection( aPolyRect ); @@ -421,8 +421,8 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, if ( mbInitFillColor ) InitFillColor(); - Rectangle aLogicPolyRect( rPolyPoly.GetBoundRect() ); - Rectangle aPixelRect( ImplLogicToDevicePixel( aLogicPolyRect ) ); + tools::Rectangle aLogicPolyRect( rPolyPoly.GetBoundRect() ); + tools::Rectangle aPixelRect( ImplLogicToDevicePixel( aLogicPolyRect ) ); if( !mbOutputClipped ) { @@ -686,9 +686,9 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, else { GDIMetaFile* pOldMetaFile = mpMetaFile; - Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) ); + tools::Rectangle aOutRect( LogicToPixel( rPos ), LogicToPixel( rSize ) ); Point aPoint; - Rectangle aDstRect( aPoint, GetOutputSizePixel() ); + tools::Rectangle aDstRect( aPoint, GetOutputSizePixel() ); mpMetaFile = nullptr; aDstRect.Intersection( aOutRect ); @@ -746,7 +746,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, // create alpha mask from gradient and get as Bitmap xVDev->EnableMapMode(bBufferMapModeEnabled); xVDev->SetDrawMode(DrawModeFlags::GrayGradient); - xVDev->DrawGradient(Rectangle(rPos, rSize), rTransparenceGradient); + xVDev->DrawGradient(tools::Rectangle(rPos, rSize), rTransparenceGradient); xVDev->SetDrawMode(DrawModeFlags::Default); xVDev->EnableMapMode(false); @@ -781,7 +781,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, // create mask bitmap xVDev->SetLineColor( COL_BLACK ); xVDev->SetFillColor( COL_BLACK ); - xVDev->DrawRect( Rectangle( xVDev->PixelToLogic( Point() ), xVDev->GetOutputSize() ) ); + xVDev->DrawRect( tools::Rectangle( xVDev->PixelToLogic( Point() ), xVDev->GetOutputSize() ) ); xVDev->SetDrawMode( DrawModeFlags::WhiteLine | DrawModeFlags::WhiteFill | DrawModeFlags::WhiteText | DrawModeFlags::WhiteBitmap | DrawModeFlags::WhiteGradient ); const_cast<GDIMetaFile&>(rMtf).WindStart(); @@ -793,7 +793,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, // create alpha mask from gradient xVDev->SetDrawMode( DrawModeFlags::GrayGradient ); - xVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient ); + xVDev->DrawGradient( tools::Rectangle( rPos, rSize ), rTransparenceGradient ); xVDev->SetDrawMode( DrawModeFlags::Default ); xVDev->EnableMapMode( false ); xVDev->DrawMask( Point(), xVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) ); diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx index e4d89716f28d..452cb12f4df6 100644 --- a/vcl/source/outdev/wallpaper.cxx +++ b/vcl/source/outdev/wallpaper.cxx @@ -25,7 +25,7 @@ #include <wall2.hxx> -void OutputDevice::DrawWallpaper( const Rectangle& rRect, +void OutputDevice::DrawWallpaper( const tools::Rectangle& rRect, const Wallpaper& rWallpaper ) { assert(!is_double_buffered_window()); @@ -38,7 +38,7 @@ void OutputDevice::DrawWallpaper( const Rectangle& rRect, if ( rWallpaper.GetStyle() != WallpaperStyle::NONE ) { - Rectangle aRect = LogicToPixel( rRect ); + tools::Rectangle aRect = LogicToPixel( rRect ); aRect.Justify(); if ( !aRect.IsEmpty() ) @@ -80,7 +80,7 @@ void OutputDevice::DrawColorWallpaper( long nX, long nY, bool bMap = mbMap; EnableMapMode( false ); - DrawRect( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); + DrawRect( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); SetLineColor( aOldLineColor ); SetFillColor( aOldFillColor ); EnableMapMode( bMap ); @@ -170,7 +170,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, // calc pos and size if( rWallpaper.IsRect() ) { - const Rectangle aBound( LogicToPixel( rWallpaper.GetRect() ) ); + const tools::Rectangle aBound( LogicToPixel( rWallpaper.GetRect() ) ); aPos = aBound.TopLeft(); aSize = aBound.GetSize(); } @@ -183,7 +183,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, mpMetaFile = nullptr; EnableMapMode( false ); Push( PushFlags::CLIPREGION ); - IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); + IntersectClipRegion( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); switch( eStyle ) { @@ -286,11 +286,11 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, { const Size aBmpSize( aBmpEx.GetSizePixel() ); const Point aTmpPoint; - const Rectangle aOutRect( aTmpPoint, GetOutputSizePixel() ); - const Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) ); - Rectangle aWorkRect; + const tools::Rectangle aOutRect( aTmpPoint, GetOutputSizePixel() ); + const tools::Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) ); + tools::Rectangle aWorkRect; - aWorkRect = Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1L ); + aWorkRect = tools::Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1L ); aWorkRect.Justify(); aWorkRect.Intersection( aColRect ); if( !aWorkRect.IsEmpty() ) @@ -300,7 +300,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, rWallpaper ); } - aWorkRect = Rectangle( 0, aPos.Y(), aPos.X() - 1L, aPos.Y() + aBmpSize.Height() - 1L ); + aWorkRect = tools::Rectangle( 0, aPos.Y(), aPos.X() - 1L, aPos.Y() + aBmpSize.Height() - 1L ); aWorkRect.Justify(); aWorkRect.Intersection( aColRect ); if( !aWorkRect.IsEmpty() ) @@ -310,7 +310,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, rWallpaper ); } - aWorkRect = Rectangle( aPos.X() + aBmpSize.Width(), aPos.Y(), + aWorkRect = tools::Rectangle( aPos.X() + aBmpSize.Width(), aPos.Y(), aOutRect.Right(), aPos.Y() + aBmpSize.Height() - 1L ); aWorkRect.Justify(); aWorkRect.Intersection( aColRect ); @@ -321,7 +321,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, rWallpaper ); } - aWorkRect = Rectangle( 0, aPos.Y() + aBmpSize.Height(), + aWorkRect = tools::Rectangle( 0, aPos.Y() + aBmpSize.Height(), aOutRect.Right(), aOutRect.Bottom() ); aWorkRect.Justify(); aWorkRect.Intersection( aColRect ); @@ -349,16 +349,16 @@ void OutputDevice::DrawGradientWallpaper( long nX, long nY, { assert(!is_double_buffered_window()); - Rectangle aBound; + tools::Rectangle aBound; GDIMetaFile* pOldMetaFile = mpMetaFile; const bool bOldMap = mbMap; - aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); + aBound = tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); mpMetaFile = nullptr; EnableMapMode( false ); Push( PushFlags::CLIPREGION ); - IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); + IntersectClipRegion( tools::Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); DrawGradient( aBound, rWallpaper.GetGradient() ); |