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 CHART2_BASEGFXHELPER_HXX
20 #define CHART2_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
com::sun::star::awt::Point
B2IRectangleToAWTPoint(
51 const ::basegfx::B2IRectangle
& rB2IRectangle
);
53 OOO_DLLPUBLIC_CHARTTOOLS
com::sun::star::awt::Size
B2IRectangleToAWTSize(
54 const ::basegfx::B2IRectangle
& rB2IRectangle
);
56 OOO_DLLPUBLIC_CHARTTOOLS
57 com::sun::star::awt::Rectangle
B2IRectangleToAWTRectangle(
58 const ::basegfx::B2IRectangle
& rB2IRectangle
);
60 ::basegfx::B3DVector
Direction3DToB3DVector(
61 const com::sun::star::drawing::Direction3D
& rDirection
);
63 com::sun::star::drawing::Direction3D
B3DVectorToDirection3D(
64 const ::basegfx::B3DVector
& rB3DVector
);
66 ::basegfx::B3DVector
Position3DToB3DVector(
67 const com::sun::star::drawing::Position3D
& rPosition
);
69 com::sun::star::drawing::Position3D
B3DVectorToPosition3D(
70 const ::basegfx::B3DVector
& rB3DVector
);
72 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DHomMatrix
HomogenMatrixToB3DHomMatrix(
73 const ::com::sun::star::drawing::HomogenMatrix
& rHomogenMatrix
);
75 OOO_DLLPUBLIC_CHARTTOOLS
76 ::com::sun::star::drawing::HomogenMatrix
B3DHomMatrixToHomogenMatrix(
77 const ::basegfx::B3DHomMatrix
& rB3DMatrix
);
79 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple
GetRotationFromMatrix(
80 const ::basegfx::B3DHomMatrix
& rB3DMatrix
);
82 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple
GetScaleFromMatrix(
83 const ::basegfx::B3DHomMatrix
& rB3DMatrix
);
85 void ReduceToRotationMatrix( ::basegfx::B3DHomMatrix
& rB3DMatrix
);
87 OOO_DLLPUBLIC_CHARTTOOLS
double Deg2Rad( double fDegrees
);
88 OOO_DLLPUBLIC_CHARTTOOLS
double Rad2Deg( double fRadians
);
90 } // namespace BaseGFXHelper
93 // CHART2_BASEGFXHELPER_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */