mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 10:36:30 +03:00
58 lines
1.2 KiB
C++
58 lines
1.2 KiB
C++
#ifndef EE_GRAPHICS_RECTANGLEDRAWABLE
|
|
#define EE_GRAPHICS_RECTANGLEDRAWABLE
|
|
|
|
#include <eepp/graphics/primitivedrawable.hpp>
|
|
#include <eepp/math/rect.hpp>
|
|
|
|
namespace EE { namespace Graphics {
|
|
|
|
class EE_API RectangleDrawable : public PrimitiveDrawable {
|
|
public:
|
|
RectangleDrawable();
|
|
|
|
RectangleDrawable( const Vector2f& position, const Sizef& size );
|
|
|
|
virtual Sizef getSize();
|
|
|
|
virtual void draw();
|
|
|
|
virtual void draw( const Vector2f& position );
|
|
|
|
virtual void draw( const Vector2f& position, const Sizef& size );
|
|
|
|
Float getRotation() const;
|
|
|
|
void setRotation(const Float & rotation);
|
|
|
|
Vector2f getScale() const;
|
|
|
|
void setScale(const Vector2f & scale);
|
|
|
|
void setSize(const Sizef & size);
|
|
|
|
Uint32 getCorners() const;
|
|
|
|
void setCorners(const Uint32 & corners);
|
|
|
|
RectColors getRectColors() const;
|
|
|
|
void setRectColors(const RectColors & rectColors);
|
|
protected:
|
|
Sizef mSize;
|
|
Float mRotation;
|
|
Vector2f mScale;
|
|
Uint32 mCorners;
|
|
RectColors mRectColors;
|
|
bool mUsingRectColors;
|
|
|
|
void drawRectangle( const Rectf& R, const Color& TopLeft, const Color& BottomLeft, const Color& BottomRight, const Color& TopRight, const Float& Angle, const Vector2f& Scale );
|
|
|
|
void updateVertex();
|
|
|
|
virtual void onColorFilterChange();
|
|
};
|
|
|
|
}}
|
|
|
|
#endif
|