/** * @file XTPChartFastLineSeriesStyle.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(__XTPCHARTFASTLINESERIESSTYLE_H__) # define __XTPCHARTFASTLINESERIESSTYLE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; class CXTPChartLineStyle; /** * @brief * This class represents a line series style, which is a kind of * CXTPChartPointSeriesStyle. * * @details * A line chart or line graph is a type of graph which displays information * as a series of data points connected by straight line segments. It is a * basic type of chart common in many fields. */ class _XTP_EXT_CLASS CXTPChartFastLineSeriesStyle : public CXTPChartDiagram2DSeriesStyle { /** @cond */ DECLARE_SERIAL(CXTPChartFastLineSeriesStyle) /** @endcond */ public: /** * @brief * Constructs a CXTPChartFastLineSeriesStyle object. */ CXTPChartFastLineSeriesStyle(); /** * @brief * Destroys a CXTPChartFastLineSeriesStyle object, handles cleanup. */ virtual ~CXTPChartFastLineSeriesStyle(); public: /** * @brief * Call this function to get the line style of the line series. * * @return * A pointer to a chart line style object. */ CXTPChartLineStyle* GetLineStyle() const; /** * @brief * Enables/disables antialiasing if supported. * * @return * TRUE if antialiasing is enabled, FALSE otherwise. */ BOOL GetAntialiasing() const; /** * @brief * Enables/disables antialiasing if supported. * * @param bEnable TRUE to enable antialiasing, FALSE to disable. */ void SetAntialiasing(BOOL bEnable = TRUE); protected: /** * @brief * Call this function to create a view of the line series. * * @param pSeries A pointer to the chart series object. * @param pDiagramView A pointer to the diagram view object. * * @return * Returns a pointer to the associated series view object. */ virtual CXTPChartSeriesView* CreateView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); /** * @brief * Reads this object from or writes this object to an archive. * * @param pPX A CXTPPropExchange object to serialize to or from. */ void DoPropExchange(CXTPPropExchange* pPX); # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartFastLineSeriesStyle); DECLARE_OLECREATE_EX(CXTPChartFastLineSeriesStyle) LPDISPATCH OleGetLineStyle(); /** @endcond */ # endif protected: CXTPChartLineStyle* m_pLineStyle; /**< The line style.*/ BOOL m_bAntialiasing; }; AFX_INLINE BOOL CXTPChartFastLineSeriesStyle::GetAntialiasing() const { return m_bAntialiasing; } AFX_INLINE void CXTPChartFastLineSeriesStyle::SetAntialiasing(BOOL bAntialiasing) { m_bAntialiasing = bAntialiasing; OnChartChanged(); } /** * @brief * This class represents the view of a line series, which is a kind of * CXTPChartSeriesView. */ class _XTP_EXT_CLASS CXTPChartFastLineSeriesView : public CXTPChartDiagram2DSeriesView { public: /** * @brief * Constructs a CXTPChartLineSeriesView object. * * @param pSeries A pointer to the chart series object. * @param pDiagramView A pointer to the diagram view object. */ CXTPChartFastLineSeriesView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); protected: /** * @brief * Call this function to create a view of the line series point. * * @param pDC A pointer to the chart device context. * @param pPoint A pointer to the chart series point object. * @param pParentView Parent view pointer. * * @return * Returns a pointer to the associated series point view object. */ CXTPChartSeriesPointView* CreateSeriesPointView(CXTPChartDeviceContext* pDC, CXTPChartSeriesPoint* pPoint, CXTPChartElementView* pParentView); /** * @brief * This function creates a CXTPChartDeviceCommand object. This object * represents the rendering of a line 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 line 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); /** * @brief * Creates the view object. * * @param pDC Target device context pointers. */ void CreatePointsView(CXTPChartDeviceContext* pDC); }; AFX_INLINE CXTPChartLineStyle* CXTPChartFastLineSeriesStyle::GetLineStyle() const { return m_pLineStyle; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTFASTLINESERIESSTYLE_H__) /** @endcond */