/** * @file XTPChartOpenGLPieDeviceCommand.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(__XTPCHARTOPENGLPIEDEVICECOMMAND_H__) # define __XTPCHARTOPENGLPIEDEVICECOMMAND_H__ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChart3dPieSeriesStyle; class CXTPChartDeviceContext; class CXTPChartSeriesStyle; class CXTPChartOpenGLDeviceContext; /** * @brief * This class represents a chart pie device command, which is a kind of * CXTPChartDeviceCommand. It specifically handles the rendering of a pie * in a chart. */ class _XTP_EXT_CLASS CXTPChartOpenGLPieDeviceCommand : public CXTPChart3dPieDeviceCommand { public: CXTPChartOpenGLPieDeviceCommand(const CXTPPoint3d& center, double radius, double startAngle, double sweepAngle, double depth, double holePercent, const CXTPChartRectF& gradientBounds, const CXTPChartColor& color, const CXTPChartColor& color2, BOOL bStartGap = FALSE, BOOL bEndGap = FALSE); ~CXTPChartOpenGLPieDeviceCommand(); protected: virtual CXTPChartElement* HitTest(CPoint point, CXTPChartElement* pParent) const; virtual void ExecuteOverride(CXTPChartDeviceContext* pDC); virtual void ApplySeriesStyle(CXTPChartSeriesStyle* pStyle); virtual void PrepareOverride(CXTPChartDeviceContext* pDC); protected: CXTPChartRectF m_rcGradientBounds; CXTPChartColor m_color; CXTPChartColor m_color2; CXTPChart3dPieSeriesStyle* m_pStyle; GLuint m_listId; BOOL m_bStartGap; BOOL m_bEndGap; private: struct BarRingInfo; struct TorusRingInfo; CXTPPoint3d AFX_CDECL GetBarPieSliceCenter(int n, ...) const; void DrawBarPie(CXTPChartOpenGLDeviceContext& dc, double dFromAngle, double dToAngle); void DrawBarPie_OpenShape(CXTPChartOpenGLDeviceContext& dc, const BarRingInfo& ring); void DrawBarPie_Shape(CXTPChartOpenGLDeviceContext& dc, const BarRingInfo& ringFrom, const BarRingInfo& ringTo); void DrawBarPie_CloseShape(CXTPChartOpenGLDeviceContext& dc, const BarRingInfo& ring); void DrawTorusPie(CXTPChartOpenGLDeviceContext& dc, double dFromAngle, double dToAngle); void DrawTorusPie_OpenShape(CXTPChartOpenGLDeviceContext& dc, const TorusRingInfo& ring); void DrawTorusPie_Shape(CXTPChartOpenGLDeviceContext& dc, const TorusRingInfo& ringFrom, const TorusRingInfo& ringTo); void DrawTorusPie_CloseShape(CXTPChartOpenGLDeviceContext& dc, const TorusRingInfo& ring); void ComputeConnectorPoints(double dFromAngle, double dToAngle); private: BOOL m_bPrepared; CXTPChart3dBox m_3dBox; CXTPPoint3d m_ptCenterConnectorPoint; CXTPPoint3d m_ptOuterConnectorPoint; }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTOPENGLPIEDEVICECOMMAND_H__) /** @endcond */