/** * @file XTPChartPieDeviceCommand.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(__XTPCHARTPIEDEVICECOMMAND_H__) # define __XTPCHARTPIEDEVICECOMMAND_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * This class is a common implementation for a pie chart device command. */ class _XTP_EXT_CLASS CXTPChartPieDeviceCommandImpl { friend class CXTPChartPieDeviceCommand; friend class CXTPChart3dPieDeviceCommand; private: /** * @brief * Constructs a CXTPChartPieDeviceCommandImpl object. * * @param ptCenter The center point of the pie. * @param dMajorSemiAxis The major semi axis of the ellipse. * @param dMinorSemiAxis The minor semi axis of the ellipse. * @param dStartAngle The start angle of the pie. * @param dSweepAngle The sweep angle of the pie. * @param dDepth The depth of the pie or torus. * @param nHolePercent Determines the size of the hole when drawing a doughnut. */ CXTPChartPieDeviceCommandImpl(const CXTPPoint3d& ptCenter, double dMajorSemiAxis, double dMinorSemiAxis, double dStartAngle, double dSweepAngle, double dDepth, double nHolePercent); protected: /** * @brief * Handles object destruction. */ virtual ~CXTPChartPieDeviceCommandImpl(); public: CXTPPoint3d m_ptCenter; /**< The center point of the pie.*/ double m_dMajorSemiAxis; /**< The major semi axis of the ellipse.*/ double m_dMinorSemiAxis; /**< The minor semi axis of the ellipse.*/ double m_dStartAngle; /**< The start angle of the pie.*/ double m_dSweepAngle; /**< The sweep angle of the pie.*/ double m_dDepth; /**< The depth of the pie or torus.*/ double m_dHolePercent; /**< Determines the size of the hole when drawing a doughnut.*/ double m_dInnerMajorSemiAxis; /**< The inner size of the major semi axis of the ellipse.*/ double m_dInnerMinorSemiAxis; /**< The inner size of the minor semi axis of the ellipse.*/ double m_dFacetSize; /**< Facet size.*/ double m_dRadius; /**< Pie radius.*/ double m_dCorrectedDepth; /**< Pie corrected depth.*/ double m_dInnerRadius; /**< Pie inner radius.*/ BOOL m_bDoughnut; /**< TRUE indicates doughnut style.*/ }; /** * @brief * Base class implementation for 2D pie chart device command. */ class _XTP_EXT_CLASS CXTPChartPieDeviceCommand : public CXTPChartDeviceCommand , protected CXTPChartPieDeviceCommandImpl { protected: /** * @brief * Constructs a CXTPChartPieDeviceCommand object. * * @param ptCenter The center point of the pie. * @param dMajorSemiAxis The major semi axis of the ellipse. * @param dMinorSemiAxis The minor semi axis of the ellipse. * @param dStartAngle The start angle of the pie. * @param dSweepAngle The sweep angle of the pie. * @param dDepth The depth of the pie or torus. * @param nHolePercent Determines the size of the hole when drawing a doughnut. */ CXTPChartPieDeviceCommand(const CXTPPoint3d& ptCenter, double dMajorSemiAxis, double dMinorSemiAxis, double dStartAngle, double dSweepAngle, double dDepth, double nHolePercent); }; // CXTPChart2dPieDeviceCommand alias is necessary fo consistency. typedef CXTPChartPieDeviceCommand CXTPChart2dPieDeviceCommand; /** * @brief * Base class implementation for 3D pie chart device command. */ class _XTP_EXT_CLASS CXTPChart3dPieDeviceCommand : public CXTPChart3dDeviceCommand , protected CXTPChartPieDeviceCommandImpl { protected: /** * @brief * Constructs a CXTPChartPieDeviceCommand object. * * @param nAntialiasingPolicy Anti-aliasing policy identifier that defines * how command behavesdepending on device context * rendering states in regards of anti-aliasing. * @param ptCenter The center point of the pie. * @param dMajorSemiAxis The major semi axis of the ellipse. * @param dMinorSemiAxis The minor semi axis of the ellipse. * @param dStartAngle The start angle of the pie. * @param dSweepAngle The sweep angle of the pie. * @param dDepth The depth of the pie or torus. * @param nHolePercent Determines the size of the hole when drawing a doughnut. */ CXTPChart3dPieDeviceCommand(XTPChart3dAntialiasingPolicy nAntialiasingPolicy, const CXTPPoint3d& ptCenter, double dMajorSemiAxis, double dMinorSemiAxis, double dStartAngle, double dSweepAngle, double dDepth, double nHolePercent); }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTPIEDEVICECOMMAND_H__) /** @endcond */