LibreOffice Module chart2 (master) 1
|
#include <PolarLabelPositionHelper.hxx>
Public Member Functions | |
PolarLabelPositionHelper (PolarPlottingPositionHelper *pPosHelper, sal_Int32 nDimensionCount, const rtl::Reference< SvxShapeGroupAnyD > &xLogicTarget) | |
virtual | ~PolarLabelPositionHelper () override |
css::awt::Point | getLabelScreenPositionAndAlignmentForLogicValues (LabelAlignment &rAlignment, double fLogicValueOnAngleAxis, double fLogicValueOnRadiusAxis, double fLogicZ, sal_Int32 nScreenValueOffsetInRadiusDirection) const |
css::awt::Point | getLabelScreenPositionAndAlignmentForUnitCircleValues (LabelAlignment &rAlignment, sal_Int32 nLabelPlacement, double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree, double fUnitCircleInnerRadius, double fUnitCircleOuterRadius, double fLogicZ, sal_Int32 nScreenValueOffsetInRadiusDirection) const |
Calculate the anchor point position for a text label. More... | |
Public Member Functions inherited from chart::LabelPositionHelper | |
LabelPositionHelper ()=delete | |
LabelPositionHelper (sal_Int32 nDimensionCount, rtl::Reference< SvxShapeGroupAnyD > xLogicTarget) | |
virtual | ~LabelPositionHelper () |
css::awt::Point | transformSceneToScreenPosition (const css::drawing::Position3D &rScenePosition3D) const |
Private Attributes | |
PolarPlottingPositionHelper * | m_pPosHelper |
Additional Inherited Members | |
Static Public Member Functions inherited from chart::LabelPositionHelper | |
static void | changeTextAdjustment (tAnySequence &rPropValues, const tNameSequence &rPropNames, LabelAlignment eAlignment) |
static void | doDynamicFontResize (tAnySequence &rPropValues, const tNameSequence &rPropNames, const css::uno::Reference< css::beans::XPropertySet > &xAxisModelProps, const css::awt::Size &rNewReferenceSize) |
static void | correctPositionForRotation (const rtl::Reference< SvxShapeText > &xShape2DText, LabelAlignment eLabelAlignment, const double fRotationAngle, bool bRotateAroundCenter) |
Protected Attributes inherited from chart::LabelPositionHelper | |
sal_Int32 | m_nDimensionCount |
Definition at line 30 of file PolarLabelPositionHelper.hxx.
chart::PolarLabelPositionHelper::PolarLabelPositionHelper | ( | PolarPlottingPositionHelper * | pPosHelper, |
sal_Int32 | nDimensionCount, | ||
const rtl::Reference< SvxShapeGroupAnyD > & | xLogicTarget | ||
) |
Definition at line 32 of file PolarLabelPositionHelper.cxx.
|
overridevirtual |
Definition at line 41 of file PolarLabelPositionHelper.cxx.
awt::Point chart::PolarLabelPositionHelper::getLabelScreenPositionAndAlignmentForLogicValues | ( | LabelAlignment & | rAlignment, |
double | fLogicValueOnAngleAxis, | ||
double | fLogicValueOnRadiusAxis, | ||
double | fLogicZ, | ||
sal_Int32 | nScreenValueOffsetInRadiusDirection | ||
) | const |
Definition at line 45 of file PolarLabelPositionHelper.cxx.
References getLabelScreenPositionAndAlignmentForUnitCircleValues(), m_pPosHelper, chart::PolarPlottingPositionHelper::transformToAngleDegree(), and chart::PolarPlottingPositionHelper::transformToRadius().
Referenced by chart::NetChart::createShapes(), and chart::VPolarAngleAxis::createTextShapes_ForAngleAxis().
awt::Point chart::PolarLabelPositionHelper::getLabelScreenPositionAndAlignmentForUnitCircleValues | ( | LabelAlignment & | rAlignment, |
sal_Int32 | nLabelPlacement, | ||
double | fUnitCircleStartAngleDegree, | ||
double | fUnitCircleWidthAngleDegree, | ||
double | fUnitCircleInnerRadius, | ||
double | fUnitCircleOuterRadius, | ||
double | fLogicZ, | ||
sal_Int32 | nScreenValueOffsetInRadiusDirection | ||
) | const |
Calculate the anchor point position for a text label.
When the requested label placement is of INSIDE
or OUTSIDE
type the returned anchor point for the text label is the middle point of the outer arc for the given slice; when the requested label placement is of CENTER
type the returned anchor point for the text label is the middle point of the line segment bisecting the slice. The text alignment is always centered when the requested label placement is of CENTER
type else it is dependent on the value of the angle defined by the horizontal axis and the ray bisecting the slice.
Definition at line 61 of file PolarLabelPositionHelper.cxx.
References aDirection, basegfx::B2DVector::getLength(), chart::LABEL_ALIGN_BOTTOM, chart::LABEL_ALIGN_CENTER, chart::LABEL_ALIGN_LEFT, chart::LABEL_ALIGN_LEFT_BOTTOM, chart::LABEL_ALIGN_LEFT_TOP, chart::LABEL_ALIGN_RIGHT, chart::LABEL_ALIGN_RIGHT_BOTTOM, chart::LABEL_ALIGN_RIGHT_TOP, chart::LABEL_ALIGN_TOP, chart::LabelPositionHelper::m_nDimensionCount, m_pPosHelper, basegfx::rad2deg(), chart::LabelPositionHelper::transformSceneToScreenPosition(), and chart::PolarPlottingPositionHelper::transformUnitCircleToScene().
Referenced by chart::PieChart::createTextLabelShape(), and getLabelScreenPositionAndAlignmentForLogicValues().
|
private |
Definition at line 65 of file PolarLabelPositionHelper.hxx.
Referenced by getLabelScreenPositionAndAlignmentForLogicValues(), and getLabelScreenPositionAndAlignmentForUnitCircleValues().