1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef CHART2_BASEGFXHELPER_HXX
28 #define CHART2_BASEGFXHELPER_HXX
29 
30 #include <basegfx/matrix/b3dhommatrix.hxx>
31 #include <basegfx/polygon/b3dpolypolygon.hxx>
32 #include <basegfx/polygon/b3dpolygon.hxx>
33 #include <basegfx/point/b3dpoint.hxx>
34 #include <basegfx/range/b2irectangle.hxx>
35 #include <basegfx/tuple/b3dtuple.hxx>
36 #include <basegfx/vector/b3dvector.hxx>
37 #include <basegfx/range/b3drange.hxx>
38 #include <com/sun/star/awt/Point.hpp>
39 #include <com/sun/star/awt/Rectangle.hpp>
40 #include <com/sun/star/awt/Size.hpp>
41 #include <com/sun/star/drawing/HomogenMatrix.hpp>
42 #include <com/sun/star/drawing/Direction3D.hpp>
43 #include <com/sun/star/drawing/Position3D.hpp>
44 #include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
45 #include "charttoolsdllapi.hxx"
46 
47 namespace chart
48 {
49 namespace BaseGFXHelper
50 {
51 
52 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DRange getBoundVolume( const ::com::sun::star::drawing::PolyPolygonShape3D& rPolyPoly );
53 
54 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B2IRectangle makeRectangle(
55             const com::sun::star::awt::Point& rPosition,
56             const com::sun::star::awt::Size& rSize );
57 
58 OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::awt::Point B2IRectangleToAWTPoint(
59             const ::basegfx::B2IRectangle& rB2IRectangle );
60 
61 OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::awt::Size B2IRectangleToAWTSize(
62             const ::basegfx::B2IRectangle& rB2IRectangle );
63 
64 OOO_DLLPUBLIC_CHARTTOOLS
65 com::sun::star::awt::Rectangle B2IRectangleToAWTRectangle(
66     const ::basegfx::B2IRectangle& rB2IRectangle );
67 
68 ::basegfx::B3DVector Direction3DToB3DVector(
69     const com::sun::star::drawing::Direction3D& rDirection );
70 
71 com::sun::star::drawing::Direction3D B3DVectorToDirection3D(
72     const ::basegfx::B3DVector& rB3DVector );
73 
74 ::basegfx::B3DVector Position3DToB3DVector(
75     const com::sun::star::drawing::Position3D& rPosition );
76 
77 com::sun::star::drawing::Position3D B3DVectorToPosition3D(
78     const ::basegfx::B3DVector& rB3DVector );
79 
80 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DHomMatrix HomogenMatrixToB3DHomMatrix(
81     const ::com::sun::star::drawing::HomogenMatrix & rHomogenMatrix );
82 
83 OOO_DLLPUBLIC_CHARTTOOLS
84 ::com::sun::star::drawing::HomogenMatrix B3DHomMatrixToHomogenMatrix(
85     const ::basegfx::B3DHomMatrix & rB3DMatrix );
86 
87 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple GetRotationFromMatrix(
88     const ::basegfx::B3DHomMatrix & rB3DMatrix );
89 
90 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple GetScaleFromMatrix(
91     const ::basegfx::B3DHomMatrix & rB3DMatrix );
92 
93 void ReduceToRotationMatrix( ::basegfx::B3DHomMatrix & rB3DMatrix );
94 
95 OOO_DLLPUBLIC_CHARTTOOLS double Deg2Rad( double fDegrees );
96 OOO_DLLPUBLIC_CHARTTOOLS double Rad2Deg( double fRadians );
97 
98 } //  namespace BaseGFXHelper
99 } //  namespace chart
100 
101 // CHART2_BASEGFXHELPER_HXX
102 #endif
103