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 .
21 #include <config_options.h>
22 #include <basegfx/matrix/b3dhommatrix.hxx>
23 #include <basegfx/range/b2irectangle.hxx>
24 #include <basegfx/tuple/b3dtuple.hxx>
25 #include <basegfx/vector/b3dvector.hxx>
26 #include <basegfx/range/b3drange.hxx>
27 #include <com/sun/star/awt/Point.hpp>
28 #include <com/sun/star/awt/Size.hpp>
29 #include <com/sun/star/drawing/HomogenMatrix.hpp>
30 #include <com/sun/star/drawing/Direction3D.hpp>
31 #include <com/sun/star/drawing/Position3D.hpp>
32 #include "charttoolsdllapi.hxx"
34 namespace com::sun::star::awt
{ struct Rectangle
; }
35 namespace com::sun::star::drawing
{ struct PolyPolygonShape3D
; }
37 namespace chart::BaseGFXHelper
40 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
) ::basegfx::B3DRange
getBoundVolume( const css::drawing::PolyPolygonShape3D
& rPolyPoly
);
42 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
) ::basegfx::B3DRange
getBoundVolume( const std::vector
<std::vector
<css::drawing::Position3D
>>& rPolyPoly
);
44 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
) ::basegfx::B2IRectangle
makeRectangle(
45 const css::awt::Point
& rPosition
,
46 const css::awt::Size
& rSize
);
48 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
) ::basegfx::B2IRectangle
makeRectangle( const css::awt::Rectangle
& rRect
);
50 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
) css::awt::Point
B2IRectangleToAWTPoint(
51 const ::basegfx::B2IRectangle
& rB2IRectangle
);
53 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
) css::awt::Size
B2IRectangleToAWTSize(
54 const ::basegfx::B2IRectangle
& rB2IRectangle
);
56 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
) css::awt::Rectangle
toAwtRectangle(const basegfx::B2IRectangle
& rB2IRectangle
);
58 ::basegfx::B3DVector
Direction3DToB3DVector(
59 const css::drawing::Direction3D
& rDirection
);
61 css::drawing::Direction3D
B3DVectorToDirection3D(
62 const ::basegfx::B3DVector
& rB3DVector
);
64 ::basegfx::B3DVector
Position3DToB3DVector(
65 const css::drawing::Position3D
& rPosition
);
67 css::drawing::Position3D
B3DVectorToPosition3D(
68 const ::basegfx::B3DVector
& rB3DVector
);
70 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
) ::basegfx::B3DHomMatrix
HomogenMatrixToB3DHomMatrix(
71 const css::drawing::HomogenMatrix
& rHomogenMatrix
);
73 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
)
74 css::drawing::HomogenMatrix
B3DHomMatrixToHomogenMatrix(
75 const ::basegfx::B3DHomMatrix
& rB3DMatrix
);
77 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
) ::basegfx::B3DTuple
GetRotationFromMatrix(
78 const ::basegfx::B3DHomMatrix
& rB3DMatrix
);
80 UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS
) ::basegfx::B3DTuple
GetScaleFromMatrix(
81 const ::basegfx::B3DHomMatrix
& rB3DMatrix
);
83 void ReduceToRotationMatrix( ::basegfx::B3DHomMatrix
& rB3DMatrix
);
85 } // namespace chart::BaseGFXHelper
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */