/** * @file XTPChartGdiRectangleDeviceCommand.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(__XTPCHARTGDIRECTANGLEDEVICECOMMAND_H__) # define __XTPCHARTGDIRECTANGLEDEVICECOMMAND_H__ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" namespace Gdiplus { class GpPath; } /** * @brief * This class represents a bounded rectangle device command, which is a kind of * CXTPChartDeviceCommand. It specifically handles the rendering of bounded rectangular * shapes in a chart. */ class _XTP_EXT_CLASS CXTPChartGdiBoundedRectangleDeviceCommand : public CXTPChartRectangleDeviceCommand { public: /** * @brief * Constructs a CXTPChartGdiBoundedRectangleDeviceCommand object. * * @param rect The rectangular area to be rendered by the device command. * @param color The color of the rectangle border. * @param thickness The thickness of the rectangular border. */ CXTPChartGdiBoundedRectangleDeviceCommand(const CXTPChartRectF& rect, const CXTPChartColor& color, int thickness); protected: /** * @brief * This is a virtual function override of base class CXTPChartDeviceContext. This * function acts polymorphically to do the actual drawing of the chart element * to which this device command is associated with. * * @param pDC The device context of the chart. */ void ExecuteOverride(CXTPChartDeviceContext* pDC); /** * @brief * This method gets called before a command is executed which allows for * the customization of command behavior. * * @param pDC A pointer to the chart native device context. */ virtual void BeforeExecute(CXTPChartDeviceContext* pDC); /** * @brief * This method gets called after a command is executed which allows for * the customization of command behavior. * * @param pDC A pointer to the chart native device context. */ virtual void AfterExecute(CXTPChartDeviceContext* pDC); protected: CXTPChartColor m_color; /**< The color of the rectangle border.*/ int m_thickness; /**< The thickness of the rectangle border.*/ int m_OldSmoothingMode; /**< Default SmoothingMode*/ int m_OldPixelOffsetMode; /**< Default PixelOffsetMode*/ int m_OldInterpolationMode; /**< Default InterpolationMode*/ }; class _XTP_EXT_CLASS CXTPChartGdiInnerBorderDeviceCommand : public CXTPChartGdiBoundedRectangleDeviceCommand { public: /** * @brief * Constructs a CXTPChartGdiInnerBorderDeviceCommand object. * * @param rect The rectangular area to be rendered by the device command. * @param color The color of the rectangle border. * @param thickness The thickness of the rectangular border. */ CXTPChartGdiInnerBorderDeviceCommand(const CXTPChartRectF& rect, const CXTPChartColor& color, int thickness); }; /** * @brief * This class represents a solid rectangle device command, which is a kind of * CXTPChartDeviceCommand. It specifically handles the rendering of solid * rectangular shapes in a chart. */ class _XTP_EXT_CLASS CXTPChartGdiSolidRectangleDeviceCommand : public CXTPChartRectangleDeviceCommand { public: /** * @brief * Constructs a CXTPChartGdiSolidRectangleDeviceCommand object. * * @param rect The rectangular area to be rendered by the device command. * @param color The color of the rectangle. */ CXTPChartGdiSolidRectangleDeviceCommand(const CXTPChartRectF& rect, const CXTPChartColor& color); protected: /** * @brief * This is a virtual function override of base class CXTPChartDeviceContext. This * function acts polymorphically to do the actual drawing of the chart element * to which this device command is associated with. * * @param pDC The device context of the chart. */ void ExecuteOverride(CXTPChartDeviceContext* pDC); protected: CXTPChartColor m_color; /**< The color of the rectangle.*/ }; /** * @brief * This class represents a gradient rectangle device command, which is a kind of * CXTPChartDeviceCommand. It specifically handles the rendering of gradient * rectangular shapes in a chart. */ class _XTP_EXT_CLASS CXTPChartGdiGradientRectangleDeviceCommand : public CXTPChartRectangleDeviceCommand { public: /** * @brief * Constructs a CXTPChartGdiGradientRectangleDeviceCommand object. * * @param rect The rectangular area to be rendered by the device command. * @param color The start color of the gradient. * @param color2 The end color of the gradient. * @param nMode The linear gradient mode, it can be horizontal, vertical, * forward diagonal or backward diagonal. */ CXTPChartGdiGradientRectangleDeviceCommand(const CXTPChartRectF& rect, const CXTPChartColor& color, const CXTPChartColor& color2, XTPChartLinearGradientMode nMode); protected: /** * @brief * This is a virtual function override of base class CXTPChartDeviceContext. This * function acts polymorphically to do the actual drawing of the chart element * to which this device command is associated with. * * @param pDC The device context of the chart. */ void ExecuteOverride(CXTPChartDeviceContext* pDC); protected: CXTPChartColor m_color; /**< The start color of the gradient.*/ CXTPChartColor m_color2; /**< The end color of the gradient.*/ XTPChartLinearGradientMode m_nMode; /**< The gradient mode.*/ }; /** * @brief * This class represents a hatch rectangle device command, which is a kind of * CXTPChartDeviceCommand. It specifically handles the rendering of hatch * rectangular shapes in a chart. */ class _XTP_EXT_CLASS CXTPChartGdiHatchRectangleDeviceCommand : public CXTPChartRectangleDeviceCommand { public: /** * @brief * Constructs a CXTPChartGdiHatchRectangleDeviceCommand object. * * @param rect The rectangular area to be rendered by the device command. * @param color The first color of the pattern. * @param color2 The second color of the pattern. * @param nStyle chart hatch style. */ CXTPChartGdiHatchRectangleDeviceCommand(const CXTPChartRectF& rect, const CXTPChartColor& color, const CXTPChartColor& color2, XTPChartHatchStyle nStyle); protected: /** * @brief * This is a virtual function override of base class CXTPChartDeviceContext. This * function acts polymorphically to do the actual drawing of the chart element * to which this device command is associated with. * * @param pDC The device context of the chart. */ void ExecuteOverride(CXTPChartDeviceContext* pDC); protected: CXTPChartColor m_color; /**< The first color.*/ CXTPChartColor m_color2; /**< The second color.*/ XTPChartHatchStyle m_nStyle; /**< The hatch style selected.*/ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPCHARTGDIRECTANGLEDEVICECOMMAND_H__) /** @endcond */