1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 #ifndef CHART2_BASEGFXHELPER_HXX 24 #define CHART2_BASEGFXHELPER_HXX 25 26 #include <basegfx/matrix/b3dhommatrix.hxx> 27 #include <basegfx/polygon/b3dpolypolygon.hxx> 28 #include <basegfx/polygon/b3dpolygon.hxx> 29 #include <basegfx/point/b3dpoint.hxx> 30 #include <basegfx/range/b2irectangle.hxx> 31 #include <basegfx/tuple/b3dtuple.hxx> 32 #include <basegfx/vector/b3dvector.hxx> 33 #include <basegfx/range/b3drange.hxx> 34 #include <com/sun/star/awt/Point.hpp> 35 #include <com/sun/star/awt/Rectangle.hpp> 36 #include <com/sun/star/awt/Size.hpp> 37 #include <com/sun/star/drawing/HomogenMatrix.hpp> 38 #include <com/sun/star/drawing/Direction3D.hpp> 39 #include <com/sun/star/drawing/Position3D.hpp> 40 #include <com/sun/star/drawing/PolyPolygonShape3D.hpp> 41 #include "charttoolsdllapi.hxx" 42 43 namespace chart 44 { 45 namespace BaseGFXHelper 46 { 47 48 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DRange getBoundVolume( const ::com::sun::star::drawing::PolyPolygonShape3D& rPolyPoly ); 49 50 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B2IRectangle makeRectangle( 51 const com::sun::star::awt::Point& rPosition, 52 const com::sun::star::awt::Size& rSize ); 53 54 OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::awt::Point B2IRectangleToAWTPoint( 55 const ::basegfx::B2IRectangle& rB2IRectangle ); 56 57 OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::awt::Size B2IRectangleToAWTSize( 58 const ::basegfx::B2IRectangle& rB2IRectangle ); 59 60 OOO_DLLPUBLIC_CHARTTOOLS 61 com::sun::star::awt::Rectangle B2IRectangleToAWTRectangle( 62 const ::basegfx::B2IRectangle& rB2IRectangle ); 63 64 ::basegfx::B3DVector Direction3DToB3DVector( 65 const com::sun::star::drawing::Direction3D& rDirection ); 66 67 com::sun::star::drawing::Direction3D B3DVectorToDirection3D( 68 const ::basegfx::B3DVector& rB3DVector ); 69 70 ::basegfx::B3DVector Position3DToB3DVector( 71 const com::sun::star::drawing::Position3D& rPosition ); 72 73 com::sun::star::drawing::Position3D B3DVectorToPosition3D( 74 const ::basegfx::B3DVector& rB3DVector ); 75 76 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DHomMatrix HomogenMatrixToB3DHomMatrix( 77 const ::com::sun::star::drawing::HomogenMatrix & rHomogenMatrix ); 78 79 OOO_DLLPUBLIC_CHARTTOOLS 80 ::com::sun::star::drawing::HomogenMatrix B3DHomMatrixToHomogenMatrix( 81 const ::basegfx::B3DHomMatrix & rB3DMatrix ); 82 83 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple GetRotationFromMatrix( 84 const ::basegfx::B3DHomMatrix & rB3DMatrix ); 85 86 OOO_DLLPUBLIC_CHARTTOOLS ::basegfx::B3DTuple GetScaleFromMatrix( 87 const ::basegfx::B3DHomMatrix & rB3DMatrix ); 88 89 void ReduceToRotationMatrix( ::basegfx::B3DHomMatrix & rB3DMatrix ); 90 91 OOO_DLLPUBLIC_CHARTTOOLS double Deg2Rad( double fDegrees ); 92 OOO_DLLPUBLIC_CHARTTOOLS double Rad2Deg( double fRadians ); 93 94 } // namespace BaseGFXHelper 95 } // namespace chart 96 97 // CHART2_BASEGFXHELPER_HXX 98 #endif 99