]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/text.cpp
Remove deprecated and unmaintained interfaces
[libs/gltk.git] / source / text.cpp
index a3ed762a2cd560754dcd973094e547d5977eae20..bd358032c65ff22d6f1cee3d83af64f5570e6909 100644 (file)
@@ -25,7 +25,14 @@ struct Text::CoordsToGeomData
 
 Text::Text():
        style(0)
-{ }
+{
+       Line line;
+       line.start = 0;
+       line.bytes = 0;
+       line.length = 0;
+       line.width = 0;
+       lines.push_back(line);
+}
 
 Text::Text(const Style &s, const string &t):
        style(&s)
@@ -332,9 +339,9 @@ void Text::build_line(unsigned i, const Geometry &rgeom, RenderData &data) const
 {
        const Line &line = lines[i];
 
-       GL::MatrixStack::Push _pushm(data.bld->matrix());
-       data.bld->matrix() *= GL::Matrix::translation(rgeom.x, rgeom.y, 0);
-       data.bld->matrix() *= GL::Matrix::scaling(style->get_font_size());
+       GL::VertexBuilder::PushMatrix _pushm(*data.bld);
+       data.bld->transform(GL::Matrix::translation(rgeom.x, rgeom.y, 0));
+       data.bld->transform(GL::Matrix::scaling(style->get_font_size()));
 
        style->get_font().build_string(text.substr(line.start, line.bytes), *data.bld);
 }