1*cde9e8dcSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*cde9e8dcSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*cde9e8dcSAndrew Rist * or more contributor license agreements. See the NOTICE file
5*cde9e8dcSAndrew Rist * distributed with this work for additional information
6*cde9e8dcSAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*cde9e8dcSAndrew Rist * to you under the Apache License, Version 2.0 (the
8*cde9e8dcSAndrew Rist * "License"); you may not use this file except in compliance
9*cde9e8dcSAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
11*cde9e8dcSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13*cde9e8dcSAndrew Rist * Unless required by applicable law or agreed to in writing,
14*cde9e8dcSAndrew Rist * software distributed under the License is distributed on an
15*cde9e8dcSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*cde9e8dcSAndrew Rist * KIND, either express or implied. See the License for the
17*cde9e8dcSAndrew Rist * specific language governing permissions and limitations
18*cde9e8dcSAndrew Rist * under the License.
19cdf0e10cSrcweir *
20*cde9e8dcSAndrew Rist *************************************************************/
21*cde9e8dcSAndrew Rist
22*cde9e8dcSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_chart2.hxx"
26cdf0e10cSrcweir #include "Tickmarks.hxx"
27cdf0e10cSrcweir #include "Tickmarks_Equidistant.hxx"
28cdf0e10cSrcweir #include "Tickmarks_Dates.hxx"
29cdf0e10cSrcweir #include "ViewDefines.hxx"
30cdf0e10cSrcweir #include <rtl/math.hxx>
31cdf0e10cSrcweir #include <tools/debug.hxx>
32cdf0e10cSrcweir #include <memory>
33cdf0e10cSrcweir
34cdf0e10cSrcweir //.............................................................................
35cdf0e10cSrcweir namespace chart
36cdf0e10cSrcweir {
37cdf0e10cSrcweir //.............................................................................
38cdf0e10cSrcweir using namespace ::com::sun::star;
39cdf0e10cSrcweir using namespace ::com::sun::star::chart2;
40cdf0e10cSrcweir using namespace ::rtl::math;
41cdf0e10cSrcweir using ::basegfx::B2DVector;
42cdf0e10cSrcweir
TickInfo(const::com::sun::star::uno::Reference<::com::sun::star::chart2::XScaling> & xInverse)43cdf0e10cSrcweir TickInfo::TickInfo( const ::com::sun::star::uno::Reference<
44cdf0e10cSrcweir ::com::sun::star::chart2::XScaling >& xInverse )
45cdf0e10cSrcweir : fScaledTickValue( 0.0 )
46cdf0e10cSrcweir , xInverseScaling( xInverse )
47cdf0e10cSrcweir , aTickScreenPosition(0.0,0.0)
48cdf0e10cSrcweir , bPaintIt( true )
49cdf0e10cSrcweir , xTextShape( NULL )
50cdf0e10cSrcweir , nFactorForLimitedTextWidth(1)
51cdf0e10cSrcweir {
52cdf0e10cSrcweir }
53cdf0e10cSrcweir
getUnscaledTickValue() const54cdf0e10cSrcweir double TickInfo::getUnscaledTickValue() const
55cdf0e10cSrcweir {
56cdf0e10cSrcweir if( xInverseScaling.is() )
57cdf0e10cSrcweir return xInverseScaling->doScaling( fScaledTickValue );
58cdf0e10cSrcweir else
59cdf0e10cSrcweir return fScaledTickValue;
60cdf0e10cSrcweir }
61cdf0e10cSrcweir
getScreenDistanceBetweenTicks(const TickInfo & rOherTickInfo) const62cdf0e10cSrcweir sal_Int32 TickInfo::getScreenDistanceBetweenTicks( const TickInfo& rOherTickInfo ) const
63cdf0e10cSrcweir {
64cdf0e10cSrcweir //return the positive distance between the two first tickmarks in screen values
65cdf0e10cSrcweir
66cdf0e10cSrcweir B2DVector aDistance = rOherTickInfo.aTickScreenPosition - aTickScreenPosition;
67cdf0e10cSrcweir sal_Int32 nRet = static_cast<sal_Int32>(aDistance.getLength());
68cdf0e10cSrcweir if(nRet<0)
69cdf0e10cSrcweir nRet *= -1;
70cdf0e10cSrcweir return nRet;
71cdf0e10cSrcweir }
72cdf0e10cSrcweir
PureTickIter(::std::vector<TickInfo> & rTickInfoVector)73cdf0e10cSrcweir PureTickIter::PureTickIter( ::std::vector< TickInfo >& rTickInfoVector )
74cdf0e10cSrcweir : m_rTickVector(rTickInfoVector)
75cdf0e10cSrcweir , m_aTickIter(m_rTickVector.begin())
76cdf0e10cSrcweir {
77cdf0e10cSrcweir }
~PureTickIter()78cdf0e10cSrcweir PureTickIter::~PureTickIter()
79cdf0e10cSrcweir {
80cdf0e10cSrcweir }
firstInfo()81cdf0e10cSrcweir TickInfo* PureTickIter::firstInfo()
82cdf0e10cSrcweir {
83cdf0e10cSrcweir m_aTickIter = m_rTickVector.begin();
84cdf0e10cSrcweir if(m_aTickIter!=m_rTickVector.end())
85cdf0e10cSrcweir return &*m_aTickIter;
86cdf0e10cSrcweir return 0;
87cdf0e10cSrcweir }
nextInfo()88cdf0e10cSrcweir TickInfo* PureTickIter::nextInfo()
89cdf0e10cSrcweir {
90cdf0e10cSrcweir if(m_aTickIter!=m_rTickVector.end())
91cdf0e10cSrcweir {
92cdf0e10cSrcweir m_aTickIter++;
93cdf0e10cSrcweir if(m_aTickIter!=m_rTickVector.end())
94cdf0e10cSrcweir return &*m_aTickIter;
95cdf0e10cSrcweir }
96cdf0e10cSrcweir return 0;
97cdf0e10cSrcweir }
98cdf0e10cSrcweir
99cdf0e10cSrcweir //-----------------------------------------------------------------------------
100cdf0e10cSrcweir //-----------------------------------------------------------------------------
101cdf0e10cSrcweir //-----------------------------------------------------------------------------
102cdf0e10cSrcweir
TickFactory(const ExplicitScaleData & rScale,const ExplicitIncrementData & rIncrement)103cdf0e10cSrcweir TickFactory::TickFactory(
104cdf0e10cSrcweir const ExplicitScaleData& rScale, const ExplicitIncrementData& rIncrement )
105cdf0e10cSrcweir : m_rScale( rScale )
106cdf0e10cSrcweir , m_rIncrement( rIncrement )
107cdf0e10cSrcweir , m_xInverseScaling(NULL)
108cdf0e10cSrcweir {
109cdf0e10cSrcweir //@todo: make sure that the scale is valid for the scaling
110cdf0e10cSrcweir
111cdf0e10cSrcweir if( m_rScale.Scaling.is() )
112cdf0e10cSrcweir {
113cdf0e10cSrcweir m_xInverseScaling = m_rScale.Scaling->getInverseScaling();
114cdf0e10cSrcweir DBG_ASSERT( m_xInverseScaling.is(), "each Scaling needs to return a inverse Scaling" );
115cdf0e10cSrcweir }
116cdf0e10cSrcweir
117cdf0e10cSrcweir m_fScaledVisibleMin = m_rScale.Minimum;
118cdf0e10cSrcweir if( m_xInverseScaling.is() )
119cdf0e10cSrcweir m_fScaledVisibleMin = m_rScale.Scaling->doScaling(m_fScaledVisibleMin);
120cdf0e10cSrcweir
121cdf0e10cSrcweir m_fScaledVisibleMax = m_rScale.Maximum;
122cdf0e10cSrcweir if( m_xInverseScaling.is() )
123cdf0e10cSrcweir m_fScaledVisibleMax = m_rScale.Scaling->doScaling(m_fScaledVisibleMax);
124cdf0e10cSrcweir }
125cdf0e10cSrcweir
~TickFactory()126cdf0e10cSrcweir TickFactory::~TickFactory()
127cdf0e10cSrcweir {
128cdf0e10cSrcweir }
129cdf0e10cSrcweir
isDateAxis() const130cdf0e10cSrcweir bool TickFactory::isDateAxis() const
131cdf0e10cSrcweir {
132cdf0e10cSrcweir return m_rScale.AxisType == AxisType::DATE;
133cdf0e10cSrcweir }
134cdf0e10cSrcweir
getAllTicks(::std::vector<::std::vector<TickInfo>> & rAllTickInfos) const135cdf0e10cSrcweir void TickFactory::getAllTicks( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const
136cdf0e10cSrcweir {
137cdf0e10cSrcweir if( isDateAxis() )
138cdf0e10cSrcweir DateTickFactory( m_rScale, m_rIncrement ).getAllTicks( rAllTickInfos );
139cdf0e10cSrcweir else
140cdf0e10cSrcweir EquidistantTickFactory( m_rScale, m_rIncrement ).getAllTicks( rAllTickInfos );
141cdf0e10cSrcweir }
142cdf0e10cSrcweir
getAllTicksShifted(::std::vector<::std::vector<TickInfo>> & rAllTickInfos) const143cdf0e10cSrcweir void TickFactory::getAllTicksShifted( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const
144cdf0e10cSrcweir {
145cdf0e10cSrcweir if( isDateAxis() )
146cdf0e10cSrcweir DateTickFactory( m_rScale, m_rIncrement ).getAllTicksShifted( rAllTickInfos );
147cdf0e10cSrcweir else
148cdf0e10cSrcweir EquidistantTickFactory( m_rScale, m_rIncrement ).getAllTicksShifted( rAllTickInfos );
149cdf0e10cSrcweir }
150cdf0e10cSrcweir
151cdf0e10cSrcweir //-----------------------------------------------------------------------------
152cdf0e10cSrcweir // ___TickFactory_2D___
153cdf0e10cSrcweir //-----------------------------------------------------------------------------
TickFactory_2D(const ExplicitScaleData & rScale,const ExplicitIncrementData & rIncrement,const B2DVector & rStartScreenPos,const B2DVector & rEndScreenPos,const B2DVector & rAxisLineToLabelLineShift)154cdf0e10cSrcweir TickFactory_2D::TickFactory_2D(
155cdf0e10cSrcweir const ExplicitScaleData& rScale, const ExplicitIncrementData& rIncrement
156cdf0e10cSrcweir //, double fStrech_SceneToScreen, double fOffset_SceneToScreen )
157cdf0e10cSrcweir , const B2DVector& rStartScreenPos, const B2DVector& rEndScreenPos
158cdf0e10cSrcweir , const B2DVector& rAxisLineToLabelLineShift )
159cdf0e10cSrcweir : TickFactory( rScale, rIncrement )
160cdf0e10cSrcweir , m_aAxisStartScreenPosition2D(rStartScreenPos)
161cdf0e10cSrcweir , m_aAxisEndScreenPosition2D(rEndScreenPos)
162cdf0e10cSrcweir , m_aAxisLineToLabelLineShift(rAxisLineToLabelLineShift)
163cdf0e10cSrcweir , m_fStrech_LogicToScreen(1.0)
164cdf0e10cSrcweir , m_fOffset_LogicToScreen(0.0)
165cdf0e10cSrcweir {
166cdf0e10cSrcweir double fWidthY = m_fScaledVisibleMax - m_fScaledVisibleMin;
167cdf0e10cSrcweir if( AxisOrientation_MATHEMATICAL==m_rScale.Orientation )
168cdf0e10cSrcweir {
169cdf0e10cSrcweir m_fStrech_LogicToScreen = 1.0/fWidthY;
170cdf0e10cSrcweir m_fOffset_LogicToScreen = -m_fScaledVisibleMin;
171cdf0e10cSrcweir }
172cdf0e10cSrcweir else
173cdf0e10cSrcweir {
174cdf0e10cSrcweir B2DVector aSwap(m_aAxisStartScreenPosition2D);
175cdf0e10cSrcweir m_aAxisStartScreenPosition2D = m_aAxisEndScreenPosition2D;
176cdf0e10cSrcweir m_aAxisEndScreenPosition2D = aSwap;
177cdf0e10cSrcweir
178cdf0e10cSrcweir m_fStrech_LogicToScreen = -1.0/fWidthY;
179cdf0e10cSrcweir m_fOffset_LogicToScreen = -m_fScaledVisibleMax;
180cdf0e10cSrcweir }
181cdf0e10cSrcweir }
182cdf0e10cSrcweir
~TickFactory_2D()183cdf0e10cSrcweir TickFactory_2D::~TickFactory_2D()
184cdf0e10cSrcweir {
185cdf0e10cSrcweir }
186cdf0e10cSrcweir
isHorizontalAxis() const187cdf0e10cSrcweir bool TickFactory_2D::isHorizontalAxis() const
188cdf0e10cSrcweir {
189cdf0e10cSrcweir return ( m_aAxisStartScreenPosition2D.getY() == m_aAxisEndScreenPosition2D.getY() );
190cdf0e10cSrcweir }
isVerticalAxis() const191cdf0e10cSrcweir bool TickFactory_2D::isVerticalAxis() const
192cdf0e10cSrcweir {
193cdf0e10cSrcweir return ( m_aAxisStartScreenPosition2D.getX() == m_aAxisEndScreenPosition2D.getX() );
194cdf0e10cSrcweir }
195cdf0e10cSrcweir
196cdf0e10cSrcweir //static
getTickScreenDistance(TickIter & rIter)197cdf0e10cSrcweir sal_Int32 TickFactory_2D::getTickScreenDistance( TickIter& rIter )
198cdf0e10cSrcweir {
199cdf0e10cSrcweir //return the positive distance between the two first tickmarks in screen values
200cdf0e10cSrcweir //if there are less than two tickmarks -1 is returned
201cdf0e10cSrcweir
202cdf0e10cSrcweir const TickInfo* pFirstTickInfo = rIter.firstInfo();
203cdf0e10cSrcweir const TickInfo* pSecondTickInfo = rIter.nextInfo();
204cdf0e10cSrcweir if(!pSecondTickInfo || !pFirstTickInfo)
205cdf0e10cSrcweir return -1;
206cdf0e10cSrcweir
207cdf0e10cSrcweir return pFirstTickInfo->getScreenDistanceBetweenTicks( *pSecondTickInfo );
208cdf0e10cSrcweir }
209cdf0e10cSrcweir
getTickScreenPosition2D(double fScaledLogicTickValue) const210cdf0e10cSrcweir B2DVector TickFactory_2D::getTickScreenPosition2D( double fScaledLogicTickValue ) const
211cdf0e10cSrcweir {
212cdf0e10cSrcweir B2DVector aRet(m_aAxisStartScreenPosition2D);
213cdf0e10cSrcweir aRet += (m_aAxisEndScreenPosition2D-m_aAxisStartScreenPosition2D)
214cdf0e10cSrcweir *((fScaledLogicTickValue+m_fOffset_LogicToScreen)*m_fStrech_LogicToScreen);
215cdf0e10cSrcweir return aRet;
216cdf0e10cSrcweir }
217cdf0e10cSrcweir
addPointSequenceForTickLine(drawing::PointSequenceSequence & rPoints,sal_Int32 nSequenceIndex,double fScaledLogicTickValue,double fInnerDirectionSign,const TickmarkProperties & rTickmarkProperties,bool bPlaceAtLabels) const218cdf0e10cSrcweir void TickFactory_2D::addPointSequenceForTickLine( drawing::PointSequenceSequence& rPoints
219cdf0e10cSrcweir , sal_Int32 nSequenceIndex
220cdf0e10cSrcweir , double fScaledLogicTickValue, double fInnerDirectionSign
221cdf0e10cSrcweir , const TickmarkProperties& rTickmarkProperties
222cdf0e10cSrcweir , bool bPlaceAtLabels ) const
223cdf0e10cSrcweir {
224cdf0e10cSrcweir if( fInnerDirectionSign==0.0 )
225cdf0e10cSrcweir fInnerDirectionSign = 1.0;
226cdf0e10cSrcweir
227cdf0e10cSrcweir B2DVector aTickScreenPosition = this->getTickScreenPosition2D(fScaledLogicTickValue);
228cdf0e10cSrcweir if( bPlaceAtLabels )
229cdf0e10cSrcweir aTickScreenPosition += m_aAxisLineToLabelLineShift;
230cdf0e10cSrcweir
231cdf0e10cSrcweir B2DVector aMainDirection = m_aAxisEndScreenPosition2D-m_aAxisStartScreenPosition2D;
232cdf0e10cSrcweir aMainDirection.normalize();
233cdf0e10cSrcweir B2DVector aOrthoDirection(-aMainDirection.getY(),aMainDirection.getX());
234cdf0e10cSrcweir aOrthoDirection *= fInnerDirectionSign;
235cdf0e10cSrcweir aOrthoDirection.normalize();
236cdf0e10cSrcweir
237cdf0e10cSrcweir B2DVector aStart = aTickScreenPosition + aOrthoDirection*rTickmarkProperties.RelativePos;
238cdf0e10cSrcweir B2DVector aEnd = aStart - aOrthoDirection*rTickmarkProperties.Length;
239cdf0e10cSrcweir
240cdf0e10cSrcweir rPoints[nSequenceIndex].realloc(2);
241cdf0e10cSrcweir rPoints[nSequenceIndex][0].X = static_cast<sal_Int32>(aStart.getX());
242cdf0e10cSrcweir rPoints[nSequenceIndex][0].Y = static_cast<sal_Int32>(aStart.getY());
243cdf0e10cSrcweir rPoints[nSequenceIndex][1].X = static_cast<sal_Int32>(aEnd.getX());
244cdf0e10cSrcweir rPoints[nSequenceIndex][1].Y = static_cast<sal_Int32>(aEnd.getY());
245cdf0e10cSrcweir }
246cdf0e10cSrcweir
getDistanceAxisTickToText(const AxisProperties & rAxisProperties,bool bIncludeFarAwayDistanceIfSo,bool bIncludeSpaceBetweenTickAndText) const247cdf0e10cSrcweir B2DVector TickFactory_2D::getDistanceAxisTickToText( const AxisProperties& rAxisProperties, bool bIncludeFarAwayDistanceIfSo, bool bIncludeSpaceBetweenTickAndText ) const
248cdf0e10cSrcweir {
249cdf0e10cSrcweir bool bFarAwayLabels = false;
250cdf0e10cSrcweir if( ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START == rAxisProperties.m_eLabelPos
251cdf0e10cSrcweir || ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END == rAxisProperties.m_eLabelPos )
252cdf0e10cSrcweir bFarAwayLabels = true;
253cdf0e10cSrcweir
254cdf0e10cSrcweir double fInnerDirectionSign = rAxisProperties.m_fInnerDirectionSign;
255cdf0e10cSrcweir if( fInnerDirectionSign==0.0 )
256cdf0e10cSrcweir fInnerDirectionSign = 1.0;
257cdf0e10cSrcweir
258cdf0e10cSrcweir B2DVector aMainDirection = m_aAxisEndScreenPosition2D-m_aAxisStartScreenPosition2D;
259cdf0e10cSrcweir aMainDirection.normalize();
260cdf0e10cSrcweir B2DVector aOrthoDirection(-aMainDirection.getY(),aMainDirection.getX());
261cdf0e10cSrcweir aOrthoDirection *= fInnerDirectionSign;
262cdf0e10cSrcweir aOrthoDirection.normalize();
263cdf0e10cSrcweir
264cdf0e10cSrcweir B2DVector aStart(0,0), aEnd(0,0);
265cdf0e10cSrcweir if( bFarAwayLabels )
266cdf0e10cSrcweir {
267cdf0e10cSrcweir TickmarkProperties aProps( AxisProperties::getBiggestTickmarkProperties() );
268cdf0e10cSrcweir aStart = aOrthoDirection*aProps.RelativePos;
269cdf0e10cSrcweir aEnd = aStart - aOrthoDirection*aProps.Length;
270cdf0e10cSrcweir }
271cdf0e10cSrcweir else
272cdf0e10cSrcweir {
273cdf0e10cSrcweir for( sal_Int32 nN=rAxisProperties.m_aTickmarkPropertiesList.size();nN--;)
274cdf0e10cSrcweir {
275cdf0e10cSrcweir const TickmarkProperties& rProps = rAxisProperties.m_aTickmarkPropertiesList[nN];
276cdf0e10cSrcweir B2DVector aNewStart = aOrthoDirection*rProps.RelativePos;
277cdf0e10cSrcweir B2DVector aNewEnd = aNewStart - aOrthoDirection*rProps.Length;
278cdf0e10cSrcweir if(aNewStart.getLength()>aStart.getLength())
279cdf0e10cSrcweir aStart=aNewStart;
280cdf0e10cSrcweir if(aNewEnd.getLength()>aEnd.getLength())
281cdf0e10cSrcweir aEnd=aNewEnd;
282cdf0e10cSrcweir }
283cdf0e10cSrcweir }
284cdf0e10cSrcweir
285cdf0e10cSrcweir B2DVector aLabelDirection(aStart);
286cdf0e10cSrcweir if( rAxisProperties.m_fInnerDirectionSign != rAxisProperties.m_fLabelDirectionSign )
287cdf0e10cSrcweir aLabelDirection = aEnd;
288cdf0e10cSrcweir
289cdf0e10cSrcweir B2DVector aOrthoLabelDirection(aOrthoDirection);
290cdf0e10cSrcweir if( rAxisProperties.m_fInnerDirectionSign != rAxisProperties.m_fLabelDirectionSign )
291cdf0e10cSrcweir aOrthoLabelDirection*=-1.0;
292cdf0e10cSrcweir aOrthoLabelDirection.normalize();
293cdf0e10cSrcweir if( bIncludeSpaceBetweenTickAndText )
294cdf0e10cSrcweir aLabelDirection += aOrthoLabelDirection*AXIS2D_TICKLABELSPACING;
295cdf0e10cSrcweir if( bFarAwayLabels && bIncludeFarAwayDistanceIfSo )
296cdf0e10cSrcweir aLabelDirection += m_aAxisLineToLabelLineShift;
297cdf0e10cSrcweir return aLabelDirection;
298cdf0e10cSrcweir }
299cdf0e10cSrcweir
createPointSequenceForAxisMainLine(drawing::PointSequenceSequence & rPoints) const300cdf0e10cSrcweir void TickFactory_2D::createPointSequenceForAxisMainLine( drawing::PointSequenceSequence& rPoints ) const
301cdf0e10cSrcweir {
302cdf0e10cSrcweir rPoints[0].realloc(2);
303cdf0e10cSrcweir rPoints[0][0].X = static_cast<sal_Int32>(m_aAxisStartScreenPosition2D.getX());
304cdf0e10cSrcweir rPoints[0][0].Y = static_cast<sal_Int32>(m_aAxisStartScreenPosition2D.getY());
305cdf0e10cSrcweir rPoints[0][1].X = static_cast<sal_Int32>(m_aAxisEndScreenPosition2D.getX());
306cdf0e10cSrcweir rPoints[0][1].Y = static_cast<sal_Int32>(m_aAxisEndScreenPosition2D.getY());
307cdf0e10cSrcweir }
308cdf0e10cSrcweir
updateScreenValues(::std::vector<::std::vector<TickInfo>> & rAllTickInfos) const309cdf0e10cSrcweir void TickFactory_2D::updateScreenValues( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos ) const
310cdf0e10cSrcweir {
311cdf0e10cSrcweir //get the transformed screen values for all tickmarks in rAllTickInfos
312cdf0e10cSrcweir ::std::vector< ::std::vector< TickInfo > >::iterator aDepthIter = rAllTickInfos.begin();
313cdf0e10cSrcweir const ::std::vector< ::std::vector< TickInfo > >::const_iterator aDepthEnd = rAllTickInfos.end();
314cdf0e10cSrcweir for( ; aDepthIter != aDepthEnd; aDepthIter++ )
315cdf0e10cSrcweir {
316cdf0e10cSrcweir ::std::vector< TickInfo >::iterator aTickIter = (*aDepthIter).begin();
317cdf0e10cSrcweir const ::std::vector< TickInfo >::const_iterator aTickEnd = (*aDepthIter).end();
318cdf0e10cSrcweir for( ; aTickIter != aTickEnd; aTickIter++ )
319cdf0e10cSrcweir {
320cdf0e10cSrcweir TickInfo& rTickInfo = (*aTickIter);
321cdf0e10cSrcweir rTickInfo.aTickScreenPosition =
322cdf0e10cSrcweir this->getTickScreenPosition2D( rTickInfo.fScaledTickValue );
323cdf0e10cSrcweir }
324cdf0e10cSrcweir }
325cdf0e10cSrcweir }
326cdf0e10cSrcweir
327cdf0e10cSrcweir //.............................................................................
328cdf0e10cSrcweir } //namespace chart
329cdf0e10cSrcweir //.............................................................................
330