#ifndef Rahmen_H #define Rahmen_H #include "Zeichnung.h" namespace Framework { class Bild; //! Bild.h class Rahmen : public Zeichnung { protected: int br; int farbe; bool alpha; bool breaks; int breakOffset; int breakLength; int lineLength; public: //! Constructor DLLEXPORT Rahmen(); //! Destructor DLLEXPORT virtual ~Rahmen(); //! Sets the width of the border //! \param br The width in pixels DLLEXPORT void setRamenBreite(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 getRBreite() 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 setFarbe(int f); //! Returns the color of the border in A8R8G8B8 format DLLEXPORT int getFarbe() const; //! Returns whether the border is drawn with alpha blending DLLEXPORT bool hatAlpha() 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 LRahmen : public Rahmen { private: public: //! Constructor DLLEXPORT LRahmen(); //! Destructor DLLEXPORT virtual ~LRahmen(); //! Draws the border //! \param zRObj The image to draw the border into DLLEXPORT void render(Bild& zRObj) override; //! Copies the border so that it can be modified without affecting //! the original DLLEXPORT Zeichnung* dublizieren() const override; }; class Rahmen3D : public Rahmen { public: //! Constructor DLLEXPORT Rahmen3D(); //! Destructor DLLEXPORT virtual ~Rahmen3D(); //! Draws the border //! \param zRObj The image to draw the border into DLLEXPORT void render(Bild& zRObj) override; //! Copies the border so that it can be modified without affecting //! the original DLLEXPORT Zeichnung* dublizieren() const override; }; } // namespace Framework #endif