Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / view / inc / PolarLabelPositionHelper.hxx
blob2c6ed3a93795e26ed0194ce772aeee1222011706
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_CHART2_SOURCE_VIEW_INC_POLARLABELPOSITIONHELPER_HXX
21 #define INCLUDED_CHART2_SOURCE_VIEW_INC_POLARLABELPOSITIONHELPER_HXX
23 #include "LabelPositionHelper.hxx"
24 #include <com/sun/star/awt/Point.hpp>
26 namespace chart
29 class PolarPlottingPositionHelper;
31 class PolarLabelPositionHelper : public LabelPositionHelper
33 public:
34 PolarLabelPositionHelper(
35 PolarPlottingPositionHelper* pPosHelper
36 , sal_Int32 nDimensionCount
37 , const css::uno::Reference< css::drawing::XShapes >& xLogicTarget
38 , ShapeFactory* pShapeFactory );
39 virtual ~PolarLabelPositionHelper() override;
41 css::awt::Point getLabelScreenPositionAndAlignmentForLogicValues(
42 LabelAlignment& rAlignment
43 , double fLogicValueOnAngleAxis
44 , double fLogicValueOnRadiusAxis
45 , double fLogicZ
46 , sal_Int32 nScreenValueOffsetInRadiusDirection ) const;
48 /** Calculate the anchor point position for a text label.
49 * When the requested label placement is of `INSIDE` or `OUTSIDE` type the
50 * returned anchor point for the text label is the middle point of the
51 * outer arc for the given slice; when the requested label placement is of
52 * `CENTER` type the returned anchor point for the text label is the
53 * middle point of the line segment bisecting the slice.
54 * The text alignment is always centered when the requested label
55 * placement is of `CENTER` type else it is dependent on the value of the
56 * angle defined by the horizontal axis and the ray bisecting the slice.
59 css::awt::Point getLabelScreenPositionAndAlignmentForUnitCircleValues(
60 LabelAlignment& rAlignment, sal_Int32 nLabelPlacement /*see css::chart::DataLabelPlacement*/
61 , double fUnitCircleStartAngleDegree, double fUnitCircleWidthAngleDegree
62 , double fUnitCircleInnerRadius, double fUnitCircleOuterRadius
63 , double fLogicZ
64 , sal_Int32 nScreenValueOffsetInRadiusDirection ) const;
66 private:
67 PolarPlottingPositionHelper* m_pPosHelper;
70 } //namespace chart
71 #endif
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */