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