#ifndef Border_H #define Border_H #include "Drawing.h" namespace Framework { class Image; //! Image.h class Border : public Drawable { protected: int thickness; int color; bool alpha; bool breaks; int breakOffset; int breakLength; int lineLength; public: //! Constructor DLLEXPORT Border(); //! Destructor DLLEXPORT virtual ~Border(); //! Sets the width of the border //! \param br The width in pixels DLLEXPORT void setBorderWidth(int br); //! If this flag is set, the border is drawn dashed //! \param br 1 -> dashed, 0 -> solid //! \param brOff Starting point of the first line segment //! \param brLength Length of a gap //! \param lineLength Length of a line DLLEXPORT void setBreaks( bool br, int brOff = 0, int brLength = 10, int lineLength = 10); //! Returns the width of the border in pixels DLLEXPORT int getRWidth() const; //! Sets whether alpha blending should be used when drawing //! \param a 1 if alpha blending should be used DLLEXPORT void setAlpha(bool a); //! Sets the color of the border //! \param f The color in A8R8G8B8 format DLLEXPORT void setColor(int f); //! Returns the color of the border in A8R8G8B8 format DLLEXPORT int getColor() const; //! Returns whether the border is drawn with alpha blending DLLEXPORT bool hasAlpha() const; //! Returns 1 if the border is drawn dashed DLLEXPORT bool hasBreaks() const; //! Starting point of the first line segment DLLEXPORT int getBreakOffset() const; //! Length of a gap DLLEXPORT int getBreakLength() const; //! Length of a line DLLEXPORT int getLineLength() const; }; //! A 2D GUI Framework drawing that draws a line border around a //! rectangle class LBorder : public Border { private: public: //! Constructor DLLEXPORT LBorder(); //! Destructor DLLEXPORT virtual ~LBorder(); //! Draws the border //! \param zRObj The image to draw the border into DLLEXPORT void render(Image& zRObj) override; //! Copies the border so that it can be modified without affecting //! the original DLLEXPORT Drawable* duplicate() const override; }; class Border3D : public Border { public: //! Constructor DLLEXPORT Border3D(); //! Destructor DLLEXPORT virtual ~Border3D(); //! Draws the border //! \param zRObj The image to draw the border into DLLEXPORT void render(Image& zRObj) override; //! Copies the border so that it can be modified without affecting //! the original DLLEXPORT Drawable* duplicate() const override; }; } // namespace Framework #endif