summaryrefslogtreecommitdiff
path: root/chart2/source/inc/ThreeDHelper.hxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2007-07-03 12:42:01 +0000
committerRüdiger Timm <rt@openoffice.org>2007-07-03 12:42:01 +0000
commita0b0d7c455315c9d1135770543c2f2566a9a467a (patch)
treea58f23f468677530787183b9bb286f3904d75509 /chart2/source/inc/ThreeDHelper.hxx
parentf6348147b93926106bc6a7b7294fbd2c937165de (diff)
INTEGRATION: CWS chart06 (1.1.2); FILE ADDED
2007/06/15 17:34:17 iha 1.1.2.5: better defaults: no borders for 3D pie simple look 2007/06/15 16:57:48 iha 1.1.2.4: #i76430# better illumination defaults 2007/06/15 12:44:01 iha 1.1.2.3: #i67754# for right-angled-axes restrict angles to meaningful values 2007/06/14 09:07:59 iha 1.1.2.2: #i67754#,#i76430# better default illumination also depending on right angled axes 2007/06/11 09:32:24 iha 1.1.2.1: #i67754# right-angled-axes, create new 3D charts with this and simple look
Diffstat (limited to 'chart2/source/inc/ThreeDHelper.hxx')
-rw-r--r--chart2/source/inc/ThreeDHelper.hxx125
1 files changed, 125 insertions, 0 deletions
diff --git a/chart2/source/inc/ThreeDHelper.hxx b/chart2/source/inc/ThreeDHelper.hxx
new file mode 100644
index 000000000000..cceedb328c43
--- /dev/null
+++ b/chart2/source/inc/ThreeDHelper.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: ThreeDHelper.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-07-03 13:42:01 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef CHART2_THREEDHELPER_HXX
+#define CHART2_THREEDHELPER_HXX
+
+#ifndef _COM_SUN_STAR_CHART2_XDIAGRAM_HPP_
+#include <com/sun/star/chart2/XDiagram.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_CAMERAGEOMETRY_HPP_
+#include <com/sun/star/drawing/CameraGeometry.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DRAWING_SHADEMODE_HPP_
+#include <com/sun/star/drawing/ShadeMode.hpp>
+#endif
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+//-----------------------------------------------------------------------------
+/**
+*/
+
+enum ThreeDLookScheme
+{
+ ThreeDLookScheme_Simple,
+ ThreeDLookScheme_Realistic,
+ ThreeDLookScheme_Unknown
+};
+
+class ThreeDHelper
+{
+public:
+
+ /** Returns the default camera geometry that is set in the Diagram CTOR.
+ This is not the property default!
+
+ @todo deprecate the hard set camera geometry and use the property
+ default
+ */
+ static ::com::sun::star::drawing::CameraGeometry getDefaultCameraGeometry( bool bPie=false );
+
+ static void getRotationAngleFromDiagram(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet >& xSceneProperties
+ , double& rfXAngleRad, double& rfYAngleRad, double& rfZAngleRad );
+ static void setRotationAngleToDiagram(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet >& xSceneProperties
+ , double fXAngleRad, double fYAngleRad, double fZAngleRad );
+
+ static void switchRightAngledAxes( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet >& xSceneProperties
+ , sal_Bool bRightAngledAxes, bool bRotateLights=true );
+
+ static void adaptRadAnglesForRightAngledAxes( double& rfXAngleRad, double& rfYAngleRad );
+ static double getXDegreeAngleLimitForRightAngledAxes();
+ static double getYDegreeAngleLimitForRightAngledAxes();
+ static double getValueClippedToRange( double fValue, const double& fPositivLimit );
+
+ static double getCameraDistance(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet >& xSceneProperties );
+ static void setCameraDistance(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet >& xSceneProperties
+ , double fCameraDistance );
+ static void ensureCameraDistanceRange( double& rfCameraDistance );
+ static void getCameraDistanceRange( double& rfMinimumDistance, double& rfMaximumDistance );
+
+ static ThreeDLookScheme detectScheme( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDiagram >& xDiagram );
+ static void setScheme( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDiagram >& xDiagram
+ , ThreeDLookScheme aScheme );
+
+ //sal_Int32 nRoundedEdges: <0 or >100 -> mixed state
+ //sal_Int32 nObjectLines: 0->no lines; 1->all lines on; other->mixed state
+
+ static void getRoundedEdgesAndObjectLines( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDiagram >& xDiagram
+ , sal_Int32& rnRoundedEdges, sal_Int32& rnObjectLines );
+ static void setRoundedEdgesAndObjectLines( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDiagram >& xDiagram
+ , sal_Int32 nRoundedEdges, sal_Int32 nObjectLines );
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif