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_VPOLARGRID_HXX
24 #define _CHART2_VPOLARGRID_HXX
25 
26 #include "VAxisOrGridBase.hxx"
27 #include "Tickmarks.hxx"
28 #include "VLineProperties.hxx"
29 #include <com/sun/star/drawing/PointSequenceSequence.hpp>
30 
31 //.............................................................................
32 namespace chart
33 {
34 //.............................................................................
35 
36 //-----------------------------------------------------------------------------
37 /**
38 */
39 class PolarPlottingPositionHelper;
40 
41 class VPolarGrid : public VAxisOrGridBase
42 {
43 //-------------------------------------------------------------------------
44 // public methods
45 //-------------------------------------------------------------------------
46 public:
47     VPolarGrid( sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount
48         , const ::com::sun::star::uno::Sequence<
49             ::com::sun::star::uno::Reference<
50                 ::com::sun::star::beans::XPropertySet > > & rGridPropertiesList //main grid, subgrid, subsubgrid etc
51         );
52     virtual ~VPolarGrid();
53 
54     virtual void createShapes();
55 
56     void setIncrements( const std::vector< ExplicitIncrementData >& rIncrements );
57 
58     static void createLinePointSequence_ForAngleAxis(
59                     ::com::sun::star::drawing::PointSequenceSequence& rPoints
60                     , ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos
61                     , const ExplicitIncrementData& rIncrement
62                     , const ExplicitScaleData& rScale
63                     , PolarPlottingPositionHelper* pPosHelper
64                     , double fLogicRadius, double fLogicZ );
65 
66 private: //member
67     ::com::sun::star::uno::Sequence<
68         ::com::sun::star::uno::Reference<
69             ::com::sun::star::beans::XPropertySet > > m_aGridPropertiesList;//main grid, subgrid, subsubgrid etc
70     PolarPlottingPositionHelper* m_pPosHelper;
71     ::std::vector< ExplicitIncrementData >   m_aIncrements;
72 
73     void    getAllTickInfos( sal_Int32 nDimensionIndex, ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const;
74 
75     void    create2DRadiusGrid( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xLogicTarget
76                     , ::std::vector< ::std::vector< TickInfo > >& rRadiusTickInfos
77                     , ::std::vector< ::std::vector< TickInfo > >& rAngleTickInfos
78                     , const ::std::vector<VLineProperties>& rLinePropertiesList );
79 #if NOTYET
80     void    create2DAngleGrid( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xLogicTarget
81                     , ::std::vector< ::std::vector< TickInfo > >& rRadiusTickInfos
82                     , ::std::vector< ::std::vector< TickInfo > >& rAngleTickInfos
83                     , const ::std::vector<VLineProperties>& rLinePropertiesList );
84 #endif
85 };
86 
87 //.............................................................................
88 } //namespace chart
89 //.............................................................................
90 #endif
91