#ifndef AlphaField_H #define AlphaField_H #include "Drawing.h" namespace Framework { class Image; //! Image.h class AlphaField; //! from this file //! A 2D GUI Framework drawing that represents a color gradient //! towards a rectangle class AlphaField : public Drawable { private: int strength; int color; public: //! Constructor DLLEXPORT AlphaField(); //! Destructor DLLEXPORT virtual ~AlphaField(); //! Sets the strength of the transition. This is the value by which the //! alpha value of the color decreases for each pixel inward //! \param st The strength DLLEXPORT void setStrength(int st); //! Sets the color of the alpha field //! \param f The color in A8R8G8B8 format DLLEXPORT void setColor(int f); //! Draws the drawing into a specific image //! \param zRObj The image to draw into DLLEXPORT void render(Image& zRObj) override; //! Returns the strength of the alpha field DLLEXPORT int getStrength() const; //! returns the color of the alpha field in A8R8G8B8 format DLLEXPORT int getColor() const; //! Copies the alpha field so that it can be used //! without affecting the original DLLEXPORT Drawable* duplicate() const override; }; } // namespace Framework #endif