/** * @file XTPChart3dPieSeriesPointView.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPCHART3DPIESERIESPOINTVIEW_H__) # define __XTPCHART3DPIESERIESPOINTVIEW_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChart3dPieSeriesView; /** * @brief * This class abstracts the view of a pie series point. This class is a kind of * CXTPChartSeriesPointView. * * @details * A pie chart (or a circle graph) is a circular chart divided into sectors, * illustrating percents. In a pie chart, the arc length of each sector (and * consequently its central angle and area), is proportional to the quantity * it represents. Together, the sectors create a full disk. */ class _XTP_EXT_CLASS CXTPChart3dPieSeriesPointView : public CXTPChartPieSeriesPointViewBase , private CXTPChart3dPieDeviceCommandEvents { DECLARE_DYNAMIC(CXTPChart3dPieSeriesPointView); public: /** * @brief * Constructs a CXTPChart3dPieSeriesPointView object. * * @param pPoint Pointer to the chart series point. * @param pParentView The parent view of the axis. */ CXTPChart3dPieSeriesPointView(CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); /** * @brief * Handles view destruction. */ virtual ~CXTPChart3dPieSeriesPointView(); public: /** * @brief * Use this function to calculate the layout of the pie series point. * * @param dAngle The swipe angle of the sector(pie). */ virtual void CalculateLayout(double& dAngle); /** * @brief * Obtains the shape center connector point. * * @return * Shape center connector point. * * @see * GetOuterCenterConnectorPoint */ const CXTPPoint3d& GetCenterShapeConnectorPoint() const; /** * @brief * Obtains the outer shape center connector point. * * @return * Outer shape center connector point. * * @see * GetCenterShapeConnectorPoint */ const CXTPPoint3d& GetOuterCenterConnectorPoint() const; protected: /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of the pie series point. * * @param pDC Pointer to a CXTPChartDeviceContext object. * * @return * Returns a CXTPChartDeviceCommand object. This object handles * the rendering of an element in the chart. Here it handles * the drawing of the pie series point. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * This function creates a label view drawing command object. * * @param pDC Pointer to a CXTPChartDeviceContext object. * @param rcBounds The rectangular boundary of the legend. * * @return * Returns a new label view drawing command object. */ virtual CXTPChartDeviceCommand* CreateLegendDeviceCommand(CXTPChartDeviceContext* pDC, CRect rcBounds); protected: /** * @brief * Notifies about updated boundaries of the command result. * * @param pCommand Sender command pointer. * @param rcBounds Updated bounray rectangle. */ virtual void OnUpdateBounds(CXTPChartDeviceCommand* pCommand, CRect rcBounds); /** * @brief * Gets called when pie connector points are computed. * * @param pCommand The sender command. * @param ptShapeCenter The coordinates of the physical shape center. * @param ptOuterCenter The coordinates of the most outer horizontal shape center point. */ virtual void OnSetConnectorPoints(CXTPChartDeviceCommand* pCommand, CXTPPoint3d ptShapeCenter, CXTPPoint3d ptOuterCenter); private: CXTPChartPieSeriesPointViewBase* m_p2dSeriesPointView; /**< Used for drawing 2D legend items*/ CXTPPoint3d m_ptShapeCenter; CXTPPoint3d m_ptOuterCenter; CXTPSubscriptionList* m_pCommandSubscriptionList; BOOL m_bStartGap; BOOL m_bEndGap; friend class CXTPChart3dPieSeriesView; }; AFX_INLINE const CXTPPoint3d& CXTPChart3dPieSeriesPointView::GetCenterShapeConnectorPoint() const { return m_ptShapeCenter; } AFX_INLINE const CXTPPoint3d& CXTPChart3dPieSeriesPointView::GetOuterCenterConnectorPoint() const { return m_ptOuterCenter; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHART3DPIESERIESPOINTVIEW_H__) /** @endcond */