/** * @file XTPChartRadarDiagramView.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(__XTPCHARTRADARDIAGRAMVIEW_H__) # define __XTPCHARTRADARDIAGRAMVIEW_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartAxis; class CXTPChartDiagram2DAppearance; class CXTPChartRadarAxisView; class CXTPChartSeriesView; class CXTPChartRadarAxisXView; class CXTPChartRadarAxisYView; class CXTPChartLineStyle; class CXTPChartFillStyle; /** * @brief * This class represents the view of a chart 2D diagram, which is a kind of * CXTPChartDiagramView. */ class _XTP_EXT_CLASS CXTPChartRadarDiagramView : public CXTPChartDiagramView { public: /** * @brief * Constructs a CXTPChartRadarDiagramView object. * * @param pDiagram A pointer to the chart diagram object. * @param pParent A pointer to the parent view object. */ CXTPChartRadarDiagramView(CXTPChartDiagram* pDiagram, CXTPChartElementView* pParent); /** * @brief * Call this function to create the view of the 2D diagram. * * @param pDC A pointer to the chart device context. */ void CreateView(CXTPChartDeviceContext* pDC); /** * @brief * Call this function to calculate the layout based on a rectangular * boundary. * * @param pDC A pointer to the chart device context. * @param rcBounds The diagram boundary. */ void CalculateView(CXTPChartDeviceContext* pDC, CRect rcBounds); void UpdateRange(CXTPChartDeviceContext* pDC); virtual CXTPChartDeviceCommand* CreateDeviceCommand(CXTPChartDeviceContext* pDC); /** * @brief * Call this function to get the view for an axis object. * * @param pAxis A pointer to the axis object whose view is to be returned. * * @return The view for the specified axis object. */ CXTPChartRadarAxisView* GetAxisView(CXTPChartAxis* pAxis) const; public: void CheckLabelBounds(const CXTPChartRectF& rcBounds); CXTPChartPointF GetScreenPoint(const CXTPChartSeriesView* pView, double x, double y) const; CXTPChartRadarAxisXView* GetAxisXView() const; CXTPChartRadarAxisYView* GetAxisYView() const; protected: /** * @brief * Use this function to add an axis view to the diagram view boundary. * * @param pDC A pointer to the chart device context. * @param pParentView The parent view of the axis view. * @param pAxis A pointer to the axis object whose view is to be * added. * @return Adds an axis viwe to diagram view boundary */ CXTPChartRadarAxisView* AddAxisView(CXTPChartDeviceContext* pDC, CXTPChartElementView* pParentView, CXTPChartAxis* pAxis); public: virtual CXTPChartDeviceCommand* CreatePolygonStripDeviceCommand( CXTPChartDeviceContext* /*pDC*/, double dRadiusFrom, double dRadiusTo, const CXTPChartColor& color1, const CXTPChartColor& color2, CXTPChartFillStyle* pFillStyle); virtual CXTPChartDeviceCommand* CreatePolygonLineDeviceCommand(CXTPChartDeviceContext* /*pDC*/, double dRadius, const CXTPChartColor& color, CXTPChartLineStyle* pLineStyle); protected: CXTPChartElementView* m_pAxisViews; /**< The axis view.*/ CXTPChartRadarAxisXView* m_pAxisXView; CXTPChartRadarAxisYView* m_pAxisYView; CRect m_rcLabelPadding; CXTPPoint2i m_ptCenter; int m_nRadius; }; AFX_INLINE CXTPChartRadarAxisXView* CXTPChartRadarDiagramView::GetAxisXView() const { return m_pAxisXView; } AFX_INLINE CXTPChartRadarAxisYView* CXTPChartRadarDiagramView::GetAxisYView() const { return m_pAxisYView; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTRADARDIAGRAMVIEW_H__) /** @endcond */