18 #ifndef ION_TEXT_BUILDER_H_
19 #define ION_TEXT_BUILDER_H_
53 font_image_ = font_image;
58 return font_image_.
Get() ? font_image_->GetFont() :
FontPtr();
107 virtual void GetShaderStrings(std::string* id_string,
108 std::string* vertex_source,
109 std::string* fragment_source) = 0;
124 size_t* num_vertices) = 0;
143 bool UpdateFontImageTextureUniform(
size_t index,
gfx::Node* node);
147 void StoreGlyphVertices(
const Layout& layout,
size_t glyph_index,
148 math::Point3f positions[4],
160 bool UpdateAttributeArray(
165 void UpdateShape(
const Layout& layout,
196 #endif // ION_TEXT_BUILDER_H_
base::AllocatorPtr allocator_
The Allocator for the FreeTypeManager and all its Fonts.
const FontPtr GetFont() const
Returns the Font from the FontImage. This may be a NULL pointer.
const base::AllocatorPtr & GetAllocator()
Returns the Allocator passed to the constructor.
base::ReferentPtr< Builder >::Type BuilderPtr
Convenience typedef for shared pointer to a Builder.
Thread-safe abstract base class.
const FontImage::ImageData * GetImageData() const
Convenience functions for derived classes.
T * Get() const
Returns a raw pointer to the instance, which may be NULL.
Range< 3, float > Range3f
base::ReferentPtr< Font >::Type FontPtr
A Shape object represents a shape (vertices + indices) to draw.
const gfx::NodePtr & GetNode() const
Returns the Node set up by the last successful call to Build().
A Layout instance specifies how glyphs are arranged to form text.
math::Range3f GetExtents() const
Returns the canonical 3D extents of the last generated geometry.
Builder is an abstract base class for building graphics objects used to render text.
A Node instance represents a node in a scene graph.
Data for each image in the FontImage.
A SharedPtr is a smart shared pointer to an instance of some class that implements reference counting...
void SetFontImage(const FontImagePtr &font_image)
Modifies the Builder to use a different FontImage in subsequent calls to Build(). ...
This class can be used in place of std::vector to allow an Ion Allocator to be used for memory alloca...
const FontImagePtr & GetFontImage() const
Returns the FontImage passed to the constructor.