]> git.tdb.fi Git - libs/gl.git/blobdiff - source/font.cpp
Make use of the ability to load multiple arguments diretly into member variables
[libs/gl.git] / source / font.cpp
index 2cab462c04e9eaef76b27066d327cebb15a93396..3b02583b401043b8e042becbc1edeb6febe9668c 100644 (file)
@@ -177,8 +177,8 @@ Font::Glyph::Loader::Loader(Glyph &g):
        glyph(g)
 {
        add("texcoords", &Loader::texcoords);
-       add("size",      &Loader::size);
-       add("offset",    &Loader::offset);
+       add("size",      &Glyph::w,     &Glyph::h);
+       add("offset",    &Glyph::off_x, &Glyph::off_y);
        add("advance",   &Glyph::advance);
 }
 
@@ -190,17 +190,5 @@ void Font::Glyph::Loader::texcoords(float x1, float y1, float x2, float y2)
        glyph.y2=y2;
 }
 
-void Font::Glyph::Loader::size(float w, float h)
-{
-       glyph.w=w;
-       glyph.h=h;
-}
-
-void Font::Glyph::Loader::offset(float x, float y)
-{
-       glyph.off_x=x;
-       glyph.off_y=y;
-}
-
 } // namespace GL
 } // namespace Msp