Files
eepp/include/eepp/graphics/rectangledrawable.hpp
Martí­n Lucas Golini 6d14696337 Color now is RGB.
ColorA now is Color.

--HG--
branch : dev
2017-04-11 02:03:52 -03:00

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