29#include <com/sun/star/drawing/Direction3D.hpp>
30#include <com/sun/star/drawing/Position3D.hpp>
32#include <com/sun/star/awt/Point.hpp>
33#include <com/sun/star/uno/Sequence.hxx>
79 const css::drawing::Position3D& rSourceValues )
const = 0;
81 const css::uno::Sequence< double >& rSourceValues )
const = 0;
92 virtual std::unique_ptr<PlottingPositionHelper>
clone()
const;
97 virtual void setScales( std::vector< ExplicitScaleData >&& rScales,
bool bSwapXAndYAxis );
103 ,
double fX2,
double fY2,
double fZ2 );
106 inline bool isLogicVisible(
double fX,
double fY,
double fZ )
const;
107 inline void doLogicScaling(
double* pX,
double* pY,
double* pZ )
const;
109 inline void clipLogicValues(
double* pX,
double* pY,
double* pZ )
const;
111 inline bool clipYRange(
double& rMin,
double& rMax )
const;
113 inline void doLogicScaling( css::drawing::Position3D& rPos )
const;
115 virtual ::chart::XTransformation2*
118 virtual css::drawing::Position3D
121 virtual css::drawing::Position3D
128 const css::drawing::Position3D& rScenePosition3D
130 , sal_Int32 nDimensionCount );
190 virtual std::unique_ptr<PlottingPositionHelper>
clone()
const override;
193 virtual void setScales( std::vector< ExplicitScaleData >&& rScales,
bool bSwapXAndYAxis )
override;
197 virtual ::chart::XTransformation2*
207 double transformToRadius(
double fLogicValueOnRadiusAxis,
bool bDoScaling=
true )
const;
219 double getWidthAngleDegree(
double& fStartLogicValueOnAngleAxis,
double& fEndLogicValueOnAngleAxis )
const;
221 virtual css::drawing::Position3D
223 virtual css::drawing::Position3D
225 css::drawing::Position3D
226 transformAngleRadiusToScene(
double fLogicValueOnAngleAxis,
double fLogicValueOnRadiusAxis,
double fLogicZ,
bool bDoScaling=
true )
const;
232 css::drawing::Position3D
265 if( css::chart2::AxisOrientation_MATHEMATICAL==rScale.
Orientation )
272 if( css::chart2::AxisOrientation_MATHEMATICAL==rScale.
Orientation )
283 if( rCoordinateSystemResolution.getLength() > 0 )
285 if( rCoordinateSystemResolution.getLength() > 1 )
287 if( rCoordinateSystemResolution.getLength() > 2 )
292 ,
double fX2,
double fY2,
double fZ2 )
294 if( !std::isfinite(fX) || !std::isfinite(fY) || !std::isfinite(fZ)
295 || !std::isfinite(fX2) || !std::isfinite(fY2) || !std::isfinite(fZ2) )
308 bool bSameX = (
static_cast<sal_Int32
>(
m_nXResolution*(fX - fScaledMinX)/(fScaledMaxX-fScaledMinX))
309 ==
static_cast<sal_Int32
>(
m_nXResolution*(fX2 - fScaledMinX)/(fScaledMaxX-fScaledMinX)) );
311 bool bSameY = (
static_cast<sal_Int32
>(
m_nYResolution*(fY - fScaledMinY)/(fScaledMaxY-fScaledMinY))
312 ==
static_cast<sal_Int32
>(
m_nYResolution*(fY2 - fScaledMinY)/(fScaledMaxY-fScaledMinY)) );
314 bool bSameZ = (
static_cast<sal_Int32
>(
m_nZResolution*(fZ - fScaledMinZ)/(fScaledMaxZ-fScaledMinZ))
315 ==
static_cast<sal_Int32
>(
m_nZResolution*(fZ2 - fScaledMinZ)/(fScaledMaxZ-fScaledMinZ)) );
317 return (bSameX && bSameY && bSameZ);
324 if( 0==nDimensionIndex )
326 else if( 2==nDimensionIndex )
332 double fX,
double fY,
double fZ )
const
344 *pX =
m_aScales[0].Scaling->doScaling(*pX);
349 *pY =
m_aScales[1].Scaling->doScaling(*pY);
353 *pZ =
m_aScales[2].Scaling->doScaling(*pZ);
362 *pX =
m_aScales[0].Scaling->doScaling(*pX);
364 *pY =
m_aScales[1].Scaling->doScaling(*pY);
366 *pZ =
m_aScales[2].Scaling->doScaling(*pZ);
371 doLogicScaling( &rPos.PositionX, &rPos.PositionY, &rPos.PositionZ );
403 std::swap( rMin, rMax );
442 return css::chart2::AxisOrientation_MATHEMATICAL ==
m_aScales[0].Orientation;
446 return css::chart2::AxisOrientation_MATHEMATICAL ==
m_aScales[1].Orientation;
450 return css::chart2::AxisOrientation_MATHEMATICAL ==
m_aScales[2].Orientation;
double getBaseValueY() const
double getLogicMaxX() const
bool isStrongLowerRequested(sal_Int32 nDimensionIndex) const
bool m_bAllowShiftZAxisPos
virtual ::chart::XTransformation2 * getTransformationScaledLogicToScene() const
double getLogicMinZ() const
bool isSameForGivenResolution(double fX, double fY, double fZ, double fX2, double fY2, double fZ2)
bool isMathematicalOrientationX() const
double getLogicMaxY() const
css::drawing::Direction3D getScaledLogicWidth() const
::basegfx::B3DHomMatrix m_aMatrixScreenToScene
const std::vector< ExplicitScaleData > & getScales() const
double getLogicMinX() const
double getLogicMinY() const
bool maySkipPointsInRegressionCalculation() const
virtual void setScales(std::vector< ExplicitScaleData > &&rScales, bool bSwapXAndYAxis)
void transformScaledLogicToScene(css::drawing::PolyPolygonShape3D &rPoly) const
virtual void setTransformationSceneToScreen(const css::drawing::HomogenMatrix &rMatrix)
bool m_bAllowShiftXAxisPos
static css::awt::Point transformSceneToScreenPosition(const css::drawing::Position3D &rScenePosition3D, const rtl::Reference< SvxShapeGroupAnyD > &xSceneTarget, sal_Int32 nDimensionCount)
bool clipYRange(double &rMin, double &rMax) const
void AllowShiftZAxisPos(bool bAllowShift)
void clipScaledLogicValues(double *pX, double *pY, double *pZ) const
void setCoordinateSystemResolution(const css::uno::Sequence< sal_Int32 > &rCoordinateSystemResolution)
bool isMathematicalOrientationZ() const
std::vector< ExplicitScaleData > m_aScales
::basegfx::B2DRectangle getScaledLogicClipDoubleRect() const
bool isLogicVisible(double fX, double fY, double fZ) const
tools::Long m_nTimeResolution
void AllowShiftXAxisPos(bool bAllowShift)
virtual std::unique_ptr< PlottingPositionHelper > clone() const
void doUnshiftedLogicScaling(double *pX, double *pY, double *pZ) const
bool m_bMaySkipPointsInRegressionCalculation
virtual css::drawing::Position3D transformLogicToScene(double fX, double fY, double fZ, bool bClip) const
virtual void setScaledCategoryWidth(double fScaledCategoryWidth)
void doLogicScaling(double *pX, double *pY, double *pZ) const
virtual css::drawing::Position3D transformScaledLogicToScene(double fX, double fY, double fZ, bool bClip) const
virtual ~PlottingPositionHelper()
std::unique_ptr< ::chart::XTransformation2 > m_xTransformationLogicToScene
void setTimeResolution(tools::Long nTimeResolution, const Date &rNullDate)
double getLogicMaxZ() const
bool isMathematicalOrientationY() const
void clipLogicValues(double *pX, double *pY, double *pZ) const
double m_fScaledCategoryWidth
std::unique_ptr< PlottingPositionHelper > createSecondaryPosHelper(const ExplicitScaleData &rSecondaryScale)
virtual ~PolarPlottingPositionHelper() override
double transformToAngleDegree(double fLogicValueOnAngleAxis, bool bDoScaling=true) const
Given a value in the angle axis scale range (e.g.
bool isMathematicalOrientationAngle() const
css::drawing::Position3D transformUnitCircleToScene(double fUnitAngleDegree, double fUnitRadius, double fLogicZ) const
It returns the scene coordinates of the passed point: this point is described through a normalized cy...
::basegfx::B3DHomMatrix m_aUnitCartesianToScene
::basegfx::B3DHomMatrix impl_calculateMatrixUnitCartesianToScene(const ::basegfx::B3DHomMatrix &rMatrixScreenToScene) const
const ::basegfx::B3DHomMatrix & getUnitCartesianToScene() const
virtual std::unique_ptr< PlottingPositionHelper > clone() const override
virtual ::chart::XTransformation2 * getTransformationScaledLogicToScene() const override
double m_fAngleDegreeOffset
Offset for angle axis in real degree.
PolarPlottingPositionHelper()
virtual void setTransformationSceneToScreen(const css::drawing::HomogenMatrix &rMatrix) override
bool isMathematicalOrientationRadius() const
css::drawing::Position3D transformAngleRadiusToScene(double fLogicValueOnAngleAxis, double fLogicValueOnRadiusAxis, double fLogicZ, bool bDoScaling=true) const
virtual void setScales(std::vector< ExplicitScaleData > &&rScales, bool bSwapXAndYAxis) override
virtual css::drawing::Position3D transformScaledLogicToScene(double fX, double fY, double fZ, bool bClip) const override
double getWidthAngleDegree(double &fStartLogicValueOnAngleAxis, double &fEndLogicValueOnAngleAxis) const
Given 2 values in the angle axis scale range (e.g.
double transformToRadius(double fLogicValueOnRadiusAxis, bool bDoScaling=true) const
Given a value in the radius axis scale range, it returns the normalized value.
double getOuterLogicRadius() const
double m_fRadiusOffset
m_bSwapXAndY (inherited): by default the X axis (scale[0]) represents the angle axis and the Y axis (...
virtual css::drawing::Position3D transformLogicToScene(double fX, double fY, double fZ, bool bClip) const override
This structure contains the explicit values for a scale like Minimum and Maximum.
css::chart2::AxisOrientation Orientation