1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_CHART2_SOURCE_INC_BASEGFXHELPER_HXX
20 #define INCLUDED_CHART2_SOURCE_INC_BASEGFXHELPER_HXX
22 #include <basegfx/matrix/b3dhommatrix.hxx>
23 #include <basegfx/polygon/b3dpolypolygon.hxx>
24 #include <basegfx/polygon/b3dpolygon.hxx>
25 #include <basegfx/point/b3dpoint.hxx>
26 #include <basegfx/range/b2irectangle.hxx>
27 #include <basegfx/tuple/b3dtuple.hxx>
28 #include <basegfx/vector/b3dvector.hxx>
29 #include <basegfx/range/b3drange.hxx>
30 #include <com/sun/star/awt/Point.hpp>
31 #include <com/sun/star/awt/Rectangle.hpp>
32 #include <com/sun/star/awt/Size.hpp>
33 #include <com/sun/star/drawing/HomogenMatrix.hpp>
34 #include <com/sun/star/drawing/Direction3D.hpp>
35 #include <com/sun/star/drawing/Position3D.hpp>
36 #include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
37 #include "charttoolsdllapi.hxx"
41 namespace BaseGFXHelper
44 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DRange
getBoundVolume( const ::com::sun::star::drawing::PolyPolygonShape3D
& rPolyPoly
);
46 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B2IRectangle
makeRectangle(
47 const com::sun::star::awt::Point
& rPosition
,
48 const com::sun::star::awt::Size
& rSize
);
50 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B2IRectangle
makeRectangle( const css::awt::Rectangle
& rRect
);
52 OOO_DLLPUBLIC_CHARTTOOLS
com::sun::star::awt::Point
B2IRectangleToAWTPoint(
53 const ::basegfx::B2IRectangle
& rB2IRectangle
);
55 OOO_DLLPUBLIC_CHARTTOOLS
com::sun::star::awt::Size
B2IRectangleToAWTSize(
56 const ::basegfx::B2IRectangle
& rB2IRectangle
);
58 ::basegfx::B3DVector
Direction3DToB3DVector(
59 const com::sun::star::drawing::Direction3D
& rDirection
);
61 com::sun::star::drawing::Direction3D
B3DVectorToDirection3D(
62 const ::basegfx::B3DVector
& rB3DVector
);
64 ::basegfx::B3DVector
Position3DToB3DVector(
65 const com::sun::star::drawing::Position3D
& rPosition
);
67 com::sun::star::drawing::Position3D
B3DVectorToPosition3D(
68 const ::basegfx::B3DVector
& rB3DVector
);
70 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DHomMatrix
HomogenMatrixToB3DHomMatrix(
71 const ::com::sun::star::drawing::HomogenMatrix
& rHomogenMatrix
);
73 OOO_DLLPUBLIC_CHARTTOOLS
74 ::com::sun::star::drawing::HomogenMatrix
B3DHomMatrixToHomogenMatrix(
75 const ::basegfx::B3DHomMatrix
& rB3DMatrix
);
77 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple
GetRotationFromMatrix(
78 const ::basegfx::B3DHomMatrix
& rB3DMatrix
);
80 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple
GetScaleFromMatrix(
81 const ::basegfx::B3DHomMatrix
& rB3DMatrix
);
83 void ReduceToRotationMatrix( ::basegfx::B3DHomMatrix
& rB3DMatrix
);
85 OOO_DLLPUBLIC_CHARTTOOLS
double Deg2Rad( double fDegrees
);
86 OOO_DLLPUBLIC_CHARTTOOLS
double Rad2Deg( double fRadians
);
88 } // namespace BaseGFXHelper
91 // INCLUDED_CHART2_SOURCE_INC_BASEGFXHELPER_HXX
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */