diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-12-13 13:45:56 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-12-13 13:45:56 +0000 |
commit | b42fe193ed1d767395959748fad2eb99ca6b4c45 (patch) | |
tree | c67ad4d5c862feeb1926112a25aa37a81068f3e1 /canvas/source/tools | |
parent | 66d4477d91a2f88698caa73779395b019095d552 (diff) |
INTEGRATION: CWS presfixes09 (1.8.32); FILE MERGED
2006/10/18 13:59:54 thb 1.8.32.4: RESYNC: (1.10-1.11); FILE MERGED
2006/09/15 15:41:01 thb 1.8.32.3: RESYNC: (1.8-1.10); FILE MERGED
2006/03/15 13:45:57 thb 1.8.32.2: #i49357# Added VCL window coordinate absolutization method
2006/03/06 21:21:11 thb 1.8.32.1: #i59324# Correctly handling the case of 'empty' ranges now in all canvastools methods (before, we'd happily process empty ranges, yielding rather arbitrary non-empty ones afterwards); improved debug display for VCL canvas sprite count
Diffstat (limited to 'canvas/source/tools')
-rw-r--r-- | canvas/source/tools/canvastools.cxx | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx index c3d50660c1b4..f4939d6930c9 100644 --- a/canvas/source/tools/canvastools.cxx +++ b/canvas/source/tools/canvastools.cxx @@ -4,9 +4,9 @@ * * $RCSfile: canvastools.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: obo $ $Date: 2006-09-17 03:25:21 $ + * last change: $Author: kz $ $Date: 2006-12-13 14:45:56 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,6 +40,7 @@ #include <com/sun/star/geometry/AffineMatrix2D.hpp> #include <com/sun/star/geometry/Matrix2D.hpp> +#include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/rendering/RenderState.hpp> #include <com/sun/star/rendering/ViewState.hpp> #include <com/sun/star/rendering/XCanvas.hpp> @@ -60,8 +61,10 @@ #include <basegfx/tools/canvastools.hxx> #include <basegfx/numeric/ftools.hxx> -#include <canvas/canvastools.hxx> +#include <toolkit/helper/vclunohelper.hxx> +#include <vcl/window.hxx> +#include <canvas/canvastools.hxx> #include <canvas/base/linepolypolygonbase.hxx> #include <limits> @@ -601,7 +604,27 @@ namespace canvas return o_rxParams; } - ::basegfx::B2DPolyPolygon getBoundMarkPolyPolygon( const ::basegfx::B2DRange& rRange ) + awt::Rectangle getAbsoluteWindowRect( const awt::Rectangle& rRect, + const uno::Reference< awt::XWindow2 >& xWin ) + { + awt::Rectangle aRetVal( rRect ); + + ::Window* pWindow = VCLUnoHelper::GetWindow(xWin); + if( pWindow ) + { + ::Point aPoint( aRetVal.X, + aRetVal.Y ); + + aPoint = pWindow->OutputToScreenPixel( aPoint ); + + aRetVal.X = aPoint.X(); + aRetVal.Y = aPoint.Y(); + } + + return aRetVal; + } + + ::basegfx::B2DPolyPolygon getBoundMarksPolyPolygon( const ::basegfx::B2DRange& rRange ) { ::basegfx::B2DPolyPolygon aPolyPoly; ::basegfx::B2DPolygon aPoly; |