32 #ifndef Text_INCLUDE_ONCE 33 #define Text_INCLUDE_ONCE 55 Text(): mColor(1,1,1,1), mBorderColor(0,0,0,1), mBackgroundColor(1,1,1,1), mOutlineColor(0,0,0,1), mShadowColor(0,0,0,0.5f), mShadowVector(2,-2),
57 mBorderEnabled(false), mBackgroundEnabled(false), mOutlineEnabled(false), mShadowEnabled(false), mKerningEnabled(true)
59 VL_DEBUG_SET_OBJECT_NAME()
83 int margin()
const {
return mMargin; }
86 const Font*
font()
const {
return mFont.get(); }
128 AABB boundingRect()
const;
133 void translate(
float x,
float y,
float z);
134 void rotate(
float degrees,
float x,
float y,
float z);
145 void renderBackground(
const Actor* actor,
const Camera* camera)
const;
146 void renderBorder(
const Actor* actor,
const Camera* camera)
const;
147 AABB rawboundingRect(
const String& text)
const;
Associates a Renderable object to an Effect and Transform.
void computeBounds_Implementation()
void setShadowColor(const fvec4 &shadow_color)
ETextAlign mTextAlignment
bool borderEnabled() const
A Renderable that renders text with a given Font.
const fvec2 & shadowVector() const
The String class implements an advanced UTF16 (Unicode BMP) string manipulation engine.
A font to be used with a Text renderable.
void setText(const String &text)
bool kerningEnabled() const
Represents an OpenGL context, possibly a widget or a pbuffer, which can also respond to keyboard...
void setInterlineSpacing(float spacing)
const fvec4 & backgroundColor() const
void setBorderEnabled(bool border)
bool outlineEnabled() const
int viewportAlignment() const
virtual void updateDirtyBufferObject(EBufferObjectUpdateMode)
Uploads the data stored in the local buffers on the GPU memory.
const fvec4 & borderColor() const
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
const fvec4 & color() const
Visualization Library main namespace.
void setMode(ETextMode mode)
void setKerningEnabled(bool kerning)
void setBackgroundColor(const fvec4 &background_color)
void setOutlineColor(const fvec4 &outline_color)
The AABB class implements an axis-aligned bounding box using vl::real precision.
virtual void deleteBufferObject()
Destroys the BufferObject (vertex buffer objects) associated to this a Renderable.
bool backgroundEnabled() const
void setShadowVector(const fvec2 &shadow_vector)
An abstract class that represents all the objects that can be rendered.
bool shadowEnabled() const
void setLayout(ETextLayout layout)
Manages most of the OpenGL rendering states responsible of the final aspect of the rendered objects...
The Sphere class defines a sphere using a center and a radius using vl::real precision.
const fvec4 & outlineColor() const
#define VLGRAPHICS_EXPORT
void setColor(const fvec4 &color)
void setShadowEnabled(bool shadow)
void setMargin(int margin)
const fvec4 & shadowColor() const
void setViewportAlignment(int align)
The ref<> class is used to reference-count an Object.
const String & text() const
ETextAlign textAlignment() const
const Font * font() const
Represents a virtual camera defining, among other things, the point of view from which scenes can be ...
ETextLayout layout() const
void setBorderColor(const fvec4 &border_color)
void setAlignment(int align)
Visualization Library's enums in the 'vl' namespace.
void setMatrix(const fmat4 &matrix)
const fmat4 matrix() const
void setBackgroundEnabled(bool background)
float interlineSpacing() const
void setTextAlignment(ETextAlign align)
void setOutlineEnabled(bool outline)