/** * @file XTPChartLineStyle.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(__XTPCHARTLINESTYLE_H__) # define __XTPCHARTLINESTYLE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartElement; class CXTPChartDeviceCommand; typedef CArray CXTPChartLineDashArray; /** * @brief * This class represents a chart line style, which is a kind of CXTPCmdTarget. */ class _XTP_EXT_CLASS CXTPChartLineStyle : public CXTPCmdTarget { public: /** * @brief * Constructs a CXTPChartLineStyle object. * * @param pOwner The owner element. */ CXTPChartLineStyle(CXTPChartElement* pOwner); public: /** * @brief * Call this function to release the object once the object is no more * relevant */ void Release(); public: /** * @brief * Call this function to set the thickness of the line. * * @param nThickness The integer value denoting the line thickness. */ void SetThickness(int nThickness); /** * @brief * Call this function to get the thickness of the line. * * @return An integer value denoting the line thickness. */ int GetThickness() const; /** * @brief * Call this function to set dash line style. * * @param nDashStyle An enumerated value specifying the line style of choice. */ void SetDashStyle(XTPChartDashStyle nDashStyle); /** * @brief * Call this function to get the dash line style. * * @return An enumerated value specifying the line style. */ XTPChartDashStyle GetDashStyle() const; void SetDashArray(const CXTPChartLineDashArray& dashArray); public: /** * @brief * This function creates a CXTPChartDeviceCommand object, this object * represents the rendering of a line. * * @param point1 The start point of the line. * @param point2 The end point of the line. * @param color The color of the line. * * @return Returns CXTPChartDeviceCommand object, this object handles * the rendering of an element in the chart. Here it handles * the drawing of a line. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(const CXTPChartPointF& point1, const CXTPChartPointF& point2, const CXTPChartColor& color); /** * @brief * This function creates a CXTPChartDeviceCommand object, this object * represents the rendering of a line. * * @param points Line points collection. * @param color The color of the line. * * @return Returns CXTPChartDeviceCommand object, this object handles * the rendering of an element in the chart. Here it handles * the drawing of a line. */ virtual CXTPChartDeviceCommand* CreateDeviceCommand(const CXTPChartPoints& points, const CXTPChartColor& color); /** * @brief * This function creates a CXTPChartDeviceCommand object, this object * represents the rendering of a spline. * * @param points The points which form the spline. * @param color The color of the line. * * @return Returns CXTPChartDeviceCommand object, this object handles * the rendering of an element in the chart. Here it handles * the drawing of a spline. */ virtual CXTPChartDeviceCommand* CreateSplineDeviceCommand(const CXTPChartPoints& points, const CXTPChartColor& color); public: virtual void DoPropExchange(CXTPPropExchange* pPX); # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartLineStyle); void OleSetDashArray(const VARIANT& var); /** @endcond */ # endif protected: int m_nThickness; /**< The line thickness.*/ XTPChartDashStyle m_nDashStyle; /**< The dash style.*/ CXTPChartElement* m_pOwner; /**< The owner element.*/ CXTPChartLineDashArray m_arrDashArray; }; AFX_INLINE void CXTPChartLineStyle::Release() { InternalRelease(); } AFX_INLINE int CXTPChartLineStyle::GetThickness() const { return m_nThickness; } AFX_INLINE XTPChartDashStyle CXTPChartLineStyle::GetDashStyle() const { return m_nDashStyle; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTLINESTYLE_H__) /** @endcond */