31#include <osl/diagnose.h>
39using ::com::sun::star::uno::Reference;
44 , m_aGridPropertiesList(
std::move(aGridPropertiesList) )
61 const std::vector<ExplicitScaleData>& rScales =
m_pPosHelper->getScales();
67 drawing::PointSequenceSequence& rPoints
72 ,
double fLogicRadius,
double fLogicZ )
76 xInverseScaling = rScale.
Scaling->getInverseScaling();
80 auto pPoints = rPoints.getArray();
83 ; pTickInfo = aIter.
nextInfo(), nTick++ )
86 pPoints[0].realloc(rPoints[0].
getLength()+30);
87 auto pPoints0 = pPoints[0].getArray();
90 double fLogicAngle = pTickInfo->getUnscaledTickValue();
93 pPoints0[nTick].X =
static_cast<sal_Int32
>(aScenePosition3D.PositionX);
94 pPoints0[nTick].Y =
static_cast<sal_Int32
>(aScenePosition3D.PositionY);
98 pPoints[0].realloc(nTick+1);
99 auto pPoints0 = pPoints[0].getArray();
100 pPoints0[nTick].X = rPoints[0][0].X;
101 pPoints0[nTick].Y = rPoints[0][0].Y;
104 pPoints[0].realloc(0);
110 ,
const std::vector<VLineProperties>& rLinePropertiesList )
115 const std::vector<ExplicitScaleData>& rScales =
m_pPosHelper->getScales();
119 xInverseScaling = rAngleScale.
Scaling->getInverseScaling();
121 double fLogicInnerRadius =
m_pPosHelper->getInnerLogicRadius();
122 double fLogicOuterRadius =
m_pPosHelper->getOuterLogicRadius();
124 sal_Int32 nLinePropertiesCount = rLinePropertiesList.size();
125 if(nLinePropertiesCount)
127 double fLogicZ = 1.0;
130 drawing::PointSequenceSequence aAllPoints;
131 for (
auto const& tick : rAngleTickInfos[0])
137 double fLogicAngle = tick.getUnscaledTickValue();
139 drawing::PointSequenceSequence aPoints(1);
140 aPoints[0].realloc(2);
141 drawing::Position3D aScenePositionStart(
m_pPosHelper->transformAngleRadiusToScene( fLogicAngle, fLogicInnerRadius, fLogicZ ) );
142 drawing::Position3D aScenePositionEnd(
m_pPosHelper->transformAngleRadiusToScene( fLogicAngle, fLogicOuterRadius, fLogicZ ) );
143 aPoints[0][0].X =
static_cast<sal_Int32
>(aScenePositionStart.PositionX);
144 aPoints[0][0].Y =
static_cast<sal_Int32
>(aScenePositionStart.PositionY);
145 aPoints[0][1].X =
static_cast<sal_Int32
>(aScenePositionEnd.PositionX);
146 aPoints[0][1].Y =
static_cast<sal_Int32
>(aScenePositionEnd.PositionY);
151 xMainTarget, aAllPoints, &rLinePropertiesList[nDepth] );
153 m_pShapeFactory->setShapeName( xShape,
"MarkHandles" );
161 ,
const std::vector<VLineProperties>& rLinePropertiesList )
166 const std::vector<ExplicitScaleData>& rScales =
m_pPosHelper->getScales();
171 if( rRadiusScale.
Scaling.is() )
172 xInverseRadiusScaling = rRadiusScale.
Scaling->getInverseScaling();
174 sal_Int32 nLinePropertiesCount = rLinePropertiesList.size();
175 TickInfoArraysType::iterator aDepthIter = rRadiusTickInfos.begin();
176 const TickInfoArraysType::const_iterator aDepthEnd = rRadiusTickInfos.end();
177 for( sal_Int32 nDepth=0
178 ; aDepthIter != aDepthEnd && nDepth < nLinePropertiesCount
179 ; ++aDepthIter, nDepth++ )
181 if( !rLinePropertiesList[nDepth].isLineVisible() )
195 drawing::PointSequenceSequence aAllPoints;
196 for (
auto const& tick : *aDepthIter)
202 double fLogicRadius = tick.getUnscaledTickValue();
203 double const fLogicZ = 1.0;
205 drawing::PointSequenceSequence aPoints(1);
207 , rAngleIncrement, rAngleScale,
m_pPosHelper.get(), fLogicRadius, fLogicZ );
213 xTarget, aAllPoints, &rLinePropertiesList[nDepth] );
233 std::vector<VLineProperties> aLinePropertiesList;
virtual TickInfo * nextInfo() override
virtual TickInfo * firstInfo() override
static OUString createChildParticleWithIndex(ObjectType eObjectType, sal_Int32 nIndex)
static OUString addChildParticle(std::u16string_view rParticle, std::u16string_view rChildParticle)
rtl::Reference< SvxShapeGroupAnyD > m_xLogicTarget
PlottingPositionHelper * m_pPosHelper
rtl::Reference< SvxShapeGroupAnyD > m_xFinalTarget
const sal_Int32 m_nDimension
rtl::Reference< SvxShapeGroupAnyD > createGroupShape(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const OUString &rName=OUString())
css::drawing::Position3D transformAngleRadiusToScene(double fLogicValueOnAngleAxis, double fLogicValueOnRadiusAxis, double fLogicZ, bool bDoScaling=true) const
static void setShapeName(const rtl::Reference< SvxShape > &xShape, const OUString &rName)
static rtl::Reference< SvxShapePolyPolygon > createLine2D(const rtl::Reference< SvxShapeGroupAnyD > &xTarget, const css::drawing::PointSequenceSequence &rPoints, const VLineProperties *pLineProperties=nullptr)
void getAllTicks(TickInfoArraysType &rAllTickInfos) const
sal_Int32 m_nDimensionIndex
static void fillLinePropertiesFromGridModel(std::vector< VLineProperties > &rLinePropertiesList, const std::vector< rtl::Reference< ::chart::GridProperties > > &rGridPropertiesList)
static void createLinePointSequence_ForAngleAxis(css::drawing::PointSequenceSequence &rPoints, TickInfoArraysType &rAllTickInfos, const ExplicitIncrementData &rIncrement, const ExplicitScaleData &rScale, PolarPlottingPositionHelper const *pPosHelper, double fLogicRadius, double fLogicZ)
std::unique_ptr< PolarPlottingPositionHelper > m_pPosHelper
std::vector< ExplicitIncrementData > m_aIncrements
VPolarGrid(sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount, std::vector< rtl::Reference< ::chart::GridProperties > > aGridPropertiesList)
virtual ~VPolarGrid() override
void create2DRadiusGrid(const rtl::Reference< SvxShapeGroupAnyD > &xLogicTarget, TickInfoArraysType &rRadiusTickInfos, TickInfoArraysType &rAngleTickInfos, const std::vector< VLineProperties > &rLinePropertiesList)
void getAllTickInfos(sal_Int32 nDimensionIndex, TickInfoArraysType &rAllTickInfos) const
std::vector< rtl::Reference< ::chart::GridProperties > > m_aGridPropertiesList
void setIncrements(std::vector< ExplicitIncrementData > &&rIncrements)
virtual void createShapes() override
Reference< XInterface > xTarget
double getLength(const B2DPolygon &rCandidate)
std::vector< TickInfoArrayType > TickInfoArraysType
OOO_DLLPUBLIC_CHARTTOOLS void appendPointSequence(css::drawing::PointSequenceSequence &rTarget, const css::drawing::PointSequenceSequence &rAdd)
drawing::PointSequenceSequence + drawing::PointSequenceSequence
describes how tickmarks are positioned on the scale of an axis.
This structure contains the explicit values for a scale like Minimum and Maximum.
css::uno::Reference< css::chart2::XScaling > Scaling