Files
eepp/include/eepp/graphics/convexshapedrawable.hpp
Martín Lucas Golini 54d520dba6 UITreeView improvements.
Added Drawable::getPixelsSize.
Improved UIPushButton.
2020-07-23 01:40:14 -03:00

45 lines
892 B
C++

#ifndef EE_GRAPHICS_CONVEXSHAPEDRAWABLE_HPP
#define EE_GRAPHICS_CONVEXSHAPEDRAWABLE_HPP
#include <eepp/graphics/primitivedrawable.hpp>
#include <eepp/math/polygon2.hpp>
namespace EE { namespace Graphics {
class EE_API ConvexShapeDrawable : public PrimitiveDrawable {
public:
static ConvexShapeDrawable* New();
ConvexShapeDrawable();
virtual Sizef getSize();
virtual Sizef getPixelsSize();
virtual void draw();
virtual void draw( const Vector2f& position );
virtual void draw( const Vector2f& position, const Sizef& size );
virtual bool isStateful() { return false; }
void setPolygon( const Polygon2f& polygon );
void addPoint( const Vector2f& point );
void addPoint( const Vector2f& point, const Color& color );
void resetPoints();
protected:
Polygon2f mPolygon;
std::vector<Color> mIndexColor;
void updateVertex();
};
}} // namespace EE::Graphics
#endif