/** * @file XTPChart2dPieSeriesView.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(__XTPCHART2DPIESERIESVIEW_H__) # define __XTPCHART2DPIESERIESVIEW_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * This class abstracts the view of a pie series. This class is a kind of * CXTPChartSeriesView. * * @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 CXTPChartPieSeriesView : public CXTPChartPieSeriesViewBase { public: /** * @brief * Constructs a CXTPChartPieSeriesView object. * * @param pSeries Pointer to the pie series object. * @param pDiagramView Pointer to the pie diagram view. */ CXTPChartPieSeriesView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); public: /** * @brief * Call this function to calculate the pie series point layout. * * @param pDC Pointer to the chart device context. * @param rcBounds The rectangular boundary. */ virtual void CalculatePointLayout(CXTPChartDeviceContext* pDC, CRect rcBounds); protected: /** * @brief * Use this function to create the pie series point view object. * * @param pDC Pointer to the chart device context. * @param pPoint Pointer to the chart series point. * @param pParentView The pointer to the parent view object. * * @return * A pointer to the chart series point view. */ virtual CXTPChartSeriesPointView* CreateSeriesPointView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); /** * @brief * This function creates a view drawing command object. This object * represents the rendering of the pie series. * * @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. */ 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); }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHART2DPIESERIESVIEW_H__) /** @endcond */