AlphaField.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef AlphaFeld_H
  2. #define AlphaFeld_H
  3. #include "Drawing.h"
  4. namespace Framework
  5. {
  6. class Bild; //! Image.h
  7. class AlphaFeld; //! from this file
  8. //! A 2D GUI Framework drawing that represents a color gradient
  9. //! towards a rectangle
  10. class AlphaFeld : public Drawable
  11. {
  12. private:
  13. int strength;
  14. int farbe;
  15. public:
  16. //! Constructor
  17. DLLEXPORT AlphaFeld();
  18. //! Destructor
  19. DLLEXPORT virtual ~AlphaFeld();
  20. //! Sets the strength of the transition. This is the value by which the
  21. //! alpha value of the color decreases for each pixel inward
  22. //! \param st The strength
  23. DLLEXPORT void setStrength(int st);
  24. //! Sets the color of the alpha field
  25. //! \param f The color in A8R8G8B8 format
  26. DLLEXPORT void setFarbe(int f);
  27. //! Draws the drawing into a specific image
  28. //! \param zRObj The image to draw into
  29. DLLEXPORT void render(Bild& zRObj) override;
  30. //! Returns the strength of the alpha field
  31. DLLEXPORT int getStrength() const;
  32. //! returns the color of the alpha field in A8R8G8B8 format
  33. DLLEXPORT int getFarbe() const;
  34. //! Copies the alpha field so that it can be used
  35. //! without affecting the original
  36. DLLEXPORT Drawable* dublizieren() const override;
  37. };
  38. } // namespace Framework
  39. #endif