/** * @file XTPChartPieDiagramBase.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(__XTPCHARTPIEDIAGRAMBASE_H__) # define __XTPCHARTPIEDIAGRAMBASE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartDeviceContext; class CXTPChartDiagramView; class CXTPChartElementView; /** @cond */ class _XTP_EXT_CLASS CXTPChartPieDiagramBaseImpl { protected: void CalculateSeriesLayout(CXTPChartDeviceContext* pDC, CXTPChartDiagramView* pView); }; /** @endcond */ /** * @brief * This class abstracts the pie diagram. This class is a kind of * CXTPChartDiagram. * * @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. */ template class CXTPChartPieDiagramBase : public BaseDiagram , private CXTPChartPieDiagramBaseImpl { protected: /** * @brief * Constructs a CXTPChart2dPieDiagramBase object. */ CXTPChartPieDiagramBase(); public: /** * @brief * Call this function to create the view of the pie diagram. * * @param pDC A pointer to the chart device context. * @param pParent A pointer to the parent view. * * @return * Returns a pointer to the associated diagram view object. */ virtual CXTPChartDiagramView* CreateView(CXTPChartDeviceContext* pDC, CXTPChartElementView* pParent) = 0; /** * @brief * Call this function to calculate the pie series layout. * * @param pDC A pointer to the chart device context. * @param pView A pointer to the diagram view. */ virtual void CalculateSeriesLayout(CXTPChartDeviceContext* pDC, CXTPChartDiagramView* pView); }; template AFX_INLINE CXTPChartPieDiagramBase::CXTPChartPieDiagramBase() { } template AFX_INLINE void CXTPChartPieDiagramBase::CalculateSeriesLayout( CXTPChartDeviceContext* pDC, CXTPChartDiagramView* pView) { CXTPChartPieDiagramBaseImpl::CalculateSeriesLayout(pDC, pView); } typedef CXTPChartPieDiagramBase CXTPChart2dPieDiagramBase; typedef CXTPChartPieDiagramBase CXTPChart3dPieDiagramBase; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTPIEDIAGRAMBASE_H__) /** @endcond */