class EE::Graphics::GlyphDrawable


#include <glyphdrawable.hpp>

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

    enum DrawMode;

    // construction

    GlyphDrawable(Texture* texture, const Rect& srcRect, const std::string& resourceName = "");

    // methods

    static GlyphDrawable* New(Texture* texture, const Rect& srcRect, const std::string& resourceName = "");
    virtual void draw();
    virtual void draw(const Vector2f& position);
    virtual void draw(const Vector2f& position, const Sizef& size);
    virtual void drawIntoVertexBuffer(VertexBuffer* vbo, const Vector2u& gridPos, const Vector2f& pos, const Uint32& textureLevel = 0);
    virtual bool isStateful();
    Texture* getTexture();
    const Rect& getSrcRect() const;
    virtual Sizef getSize();
    virtual Sizef getPixelsSize();
    const Float& getPixelDensity() const;
    void setPixelDensity(const Float& pixelDensity);
    const Vector2f& getGlyphOffset() const;
    void setGlyphOffset(const Vector2f& glyphOffset);
    const DrawMode& getDrawMode() const;
    void setDrawMode(const DrawMode& drawMode);

Inherited Members

    // typedefs

    typedef std::function<void(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);
    void popResourceChangeCallback(const Uint32& callbackId);

Detailed Documentation


Texture* getTexture()


The texture instance used by the GlyphDrawable.

const Rect& getSrcRect() const


The Texture sector that represents the GlyphDrawable

virtual Sizef getSize()


This is the same as Destination Size but with the values rounded as integers.