32 #ifndef CoreText_INCLUDE_ONCE 33 #define CoreText_INCLUDE_ONCE 52 CoreText(): 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),
54 mBorderEnabled(false), mBackgroundEnabled(false), mOutlineEnabled(false), mShadowEnabled(false), mKerningEnabled(true)
56 VL_DEBUG_SET_OBJECT_NAME()
70 int margin()
const {
return mMargin; }
75 const Font*
font()
const {
return mFont.get(); }
147 AABB boundingRect()
const;
163 void renderBackground(
const Actor* actor,
const Camera* camera)
const;
164 void renderBorder(
const Actor* actor,
const Camera* camera)
const;
165 AABB rawboundingRect(
const String& text)
const;
Associates a Renderable object to an Effect and Transform.
void setKerningEnabled(bool kerning)
If enabled text rendering uses kerning information for better quality results (slower).
const fvec4 & borderColor() const
The color of the rectangular border.
void setOutlineColor(const fvec4 &outline_color)
The color of the character outline.
void setBorderEnabled(bool border)
If true draws a rectangular border around the text.
bool borderEnabled() const
If true draws a rectangular border around the text.
ETextLayout layout() const
Text layout: left to right, right to left.
The String class implements an advanced UTF16 (Unicode BMP) string manipulation engine.
A font to be used with a Text renderable.
void setShadowColor(const fvec4 &shadow_color)
The color of the text shadow.
virtual void deleteBufferObject()
Destroys the BufferObject (vertex buffer objects) associated to this a Renderable.
void setTextAlignment(ETextAlign align)
Text alignment: left, right, center, justify.
void setLayout(ETextLayout layout)
Text layout: left to right, right to left.
void setBackgroundEnabled(bool background)
If true draws a rectangular background below the text.
Represents an OpenGL context, possibly a widget or a pbuffer, which can also respond to keyboard...
void computeBounds_Implementation()
int textOrigin() const
The origin of the text (pivot point for offsetting and rotations).
int margin() const
The margin to be left around the text.
void setFont(Font *font)
The font to be used to render the text.
const fvec4 & backgroundColor() const
The color of the rectangular background.
void setShadowVector(const fvec2 &shadow_vector)
The offset vector of the shadow.
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
Visualization Library main namespace.
void setText(const String &text)
The text to be rendered.
void setBackgroundColor(const fvec4 &background_color)
The color of the rectangular background.
The AABB class implements an axis-aligned bounding box using vl::real precision.
const fvec4 & color() const
The color of the text.
ETextAlign textAlignment() const
Text alignment: left, right, center, justify.
virtual void updateDirtyBufferObject(EBufferObjectUpdateMode)
Uploads the data stored in the local buffers on the GPU memory.
bool kerningEnabled() const
If enabled text rendering uses kerning information for better quality results (slower).
An abstract class that represents all the objects that can be rendered.
const fvec4 & outlineColor() const
The color of the character outline.
void setBorderColor(const fvec4 &border_color)
The color of the rectangular border.
void setColor(const fvec4 &color)
The color of the text.
bool outlineEnabled() const
If true the characters are drawn with an outline.
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.
#define VLGRAPHICS_EXPORT
const fvec4 & shadowColor() const
The color of the text shadow.
ETextAlign mTextAlignment
void setTextOrigin(int align)
The origin of the text (pivot point for offsetting and rotations).
const fvec2 & shadowVector() const
The offset vector of the shadow.
bool backgroundEnabled() const
If true draws a rectangular background below the text.
The ref<> class is used to reference-count an Object.
Font * font()
The font to be used to render the text.
Represents a virtual camera defining, among other things, the point of view from which scenes can be ...
bool shadowEnabled() const
If true a sort of shadow is rendered below the text.
const Font * font() const
The font to be used to render the text.
Visualization Library's enums in the 'vl' namespace.
void setShadowEnabled(bool shadow)
If true a sort of shadow is rendered below the text.
const String & text() const
The text to be rendered.
void setOutlineEnabled(bool outline)
If true the characters are drawn with an outline.
void setMargin(int margin)
The margin to be left around the text.