class EE::Graphics::NinePatch

#include <ninepatch.hpp>

class NinePatch: public EE::Graphics::DrawableResource {
public:
    // enums

    enum NinePatchSides;

    // construction

    NinePatch(
        Texture* tex,
        int left,
        int top,
        int right,
        int bottom,
        const Float& pixelDensity = 1,
        const std::string& name = ""
    );

    NinePatch(TextureRegion* textureRegion, int left, int top, int right, int bottom, const std::string& name = "");
    ~NinePatch();

    // methods

    static NinePatch* New(
        const Uint32& TexId,
        int left,
        int top,
        int right,
        int bottom,
        const Float& pixelDensity = 1,
        const std::string& name = ""
    );

    static NinePatch* New(
        Texture* tex,
        int left,
        int top,
        int right,
        int bottom,
        const Float& pixelDensity = 1,
        const std::string& name = ""
    );

    static NinePatch* New(TextureRegion* textureRegion, int left, int top, int right, int bottom, const std::string& name = "");
    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();
    TextureRegion* getTextureRegion(const int& side);
};

Inherited Members

public:
    // typedefs

    typedef std::function<void(Uint32, Event, DrawableResource*)> OnResourceChangeCallback;

    // enums

    enum Type;
    enum Event;

    // methods

    virtual Sizef getSize() = 0;
    virtual Sizef getPixelsSize() = 0;
    virtual void draw() = 0;
    virtual void draw(const Vector2f& position) = 0;
    virtual void draw(const Vector2f& position, const Sizef& size) = 0;
    virtual bool isStateful() = 0;
    void setAlpha(Uint8 alpha);
    const Uint8& getAlpha();
    void setColor(const Color& color);
    const Color& getColor() const;
    void setColorFilter(const Color& color);
    RGB getColorFilter();
    void clearColor();
    void clearColorFilter();
    void resetAlpha();
    Type getDrawableType() const;
    const Vector2f& getPosition() const;
    void setPosition(const Vector2f& position);
    virtual bool isDrawableResource() const;
    const String::HashType& getId() const;
    const std::string getName() const;
    void setName(const std::string& name);
    virtual bool isDrawableResource() const;
    Uint32 pushResourceChangeCallback(const OnResourceChangeCallback& cb);
    bool popResourceChangeCallback(const Uint32& callbackId);