/** * @file XTPChartAreaSeriesStyle.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(__XTPCHARTAREASERIESSTYLE_H__) # define __XTPCHARTAREASERIESSTYLE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPChartSeriesView; class CXTPChartBorder; class CXTPChartFillStyle; /** * @brief * CXTPChartAreaSeriesStyle is a CXTPChartPointSeriesStyle * derived class which represents the area series style. * * @details * Area series displays graphically the quantitative data in a chart. * It displays a series as a set of points connected by a line or spline * with all the area filled in below the line. */ class _XTP_EXT_CLASS CXTPChartAreaSeriesStyle : public CXTPChartPointSeriesStyle { /** @cond */ DECLARE_SERIAL(CXTPChartAreaSeriesStyle) /** @endcond */ public: /** * @brief * Constructs a CXTPChartAreaSeriesStyle object. */ CXTPChartAreaSeriesStyle(); /** * @brief * Destroys a CXTPChartAreaSeriesStyle object, handles cleanup. */ virtual ~CXTPChartAreaSeriesStyle(); public: /** * @brief * Call this function to get the background fill style. * * @return Returns a pointer to a CXTPChartFillStyle object, which abstracts * various fill styles. */ CXTPChartFillStyle* GetFillStyle() const; CXTPChartBorder* GetBorder() const; public: void DoPropExchange(CXTPPropExchange* pPX); public: /** * @brief * Call this function to get the transparency of the filled area with * respect to the background. * * @return Returns an integer whose values are from 0 to 255. * * @details * A value of 0 means fully transparent and a value of 255 means fully opaque. */ int GetTransparency() const; /** * @brief * Call this function to set the transparency of the filled area with * respect to the background. * * @param nTransparency an integer whose values are from 0 to 255. * * @details * A value of 0 means fully transparent and a value of 255 means fully opaque. */ void SetTransparency(int nTransparency); /** * @brief * Call this function to get the fill chart area indicator with * respect to the background. * * @return Returns a BOOL value. * * @details * A value of TRUE means fill on both sides. */ BOOL GetFillAcrossXAxis() const; /** * @brief * Call this function to set the fill chart area indicator with * respect to the background. * * @param nFillAcrossXAxis a BOOL value. * * @details * A value of TRUE means fill on both sides. */ void SetFillAcrossXAxis(BOOL nFillAcrossXAxis); protected: /** * @brief * Use this function to create a chart series view object. * * @param pSeries Pointer to a chart series object. * @param pDiagramView Pointer to a chart diagram view object. * * @return A pointer to the newly created CXTPChartSeriesView object. * * @details * CXTPChartSeriesView abstracts the view of a series. */ virtual CXTPChartSeriesView* CreateView(CXTPChartSeries* pSeries, CXTPChartDiagramView* pDiagramView); # ifdef _XTP_ACTIVEX public: /** @cond */ DECLARE_DISPATCH_MAP() DECLARE_INTERFACE_MAP() DECLARE_OLETYPELIB_EX(CXTPChartAreaSeriesStyle); DECLARE_OLECREATE_EX(CXTPChartAreaSeriesStyle) LPDISPATCH OleGetFillStyle(); LPDISPATCH OleGetBorder(); /** @endcond */ # endif protected: int m_nTransparency; /**< The transparency values range from 0 to 255.*/ CXTPChartBorder* m_pBorder; /**< The chart border object pointer.*/ CXTPChartFillStyle* m_pFillStyle; /**< The chart background fill style.*/ BOOL m_nFillAcrossXAxis; /**< Fill chart area across X axis (under and over X axis)*/ }; AFX_INLINE int CXTPChartAreaSeriesStyle::GetTransparency() const { return m_nTransparency; } AFX_INLINE void CXTPChartAreaSeriesStyle::SetTransparency(int nTransparency) { m_nTransparency = nTransparency; OnChartChanged(); } AFX_INLINE CXTPChartFillStyle* CXTPChartAreaSeriesStyle::GetFillStyle() const { return m_pFillStyle; } AFX_INLINE CXTPChartBorder* CXTPChartAreaSeriesStyle::GetBorder() const { return m_pBorder; } AFX_INLINE BOOL CXTPChartAreaSeriesStyle::GetFillAcrossXAxis() const { return m_nFillAcrossXAxis; } AFX_INLINE void CXTPChartAreaSeriesStyle::SetFillAcrossXAxis(BOOL nFillAcrossXAxis) { m_nFillAcrossXAxis = nFillAcrossXAxis; OnChartChanged(); } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTAREASERIESSTYLE_H__) /** @endcond */