[email protected] 7 years ago
parent
commit
ee9e89d179

+ 5 - 0
oxygine/src/oxygine/Font.cpp

@@ -24,6 +24,11 @@ namespace oxygine
         _glyphs.insert(gl);
         _glyphs.insert(gl);
     }
     }
 
 
+    void Font::clear()
+    {
+        _glyphs.clear();
+    }
+
     bool glyphFindPred(const glyph& g, int code)
     bool glyphFindPred(const glyph& g, int code)
     {
     {
         return g.ch < code;
         return g.ch < code;

+ 2 - 0
oxygine/src/oxygine/Font.h

@@ -47,6 +47,8 @@ namespace oxygine
         void addGlyph(const glyph& g);
         void addGlyph(const glyph& g);
         void sortGlyphs() {}
         void sortGlyphs() {}
 
 
+        void clear();
+
         void setScale(float scale) { _scale = scale; }
         void setScale(float scale) { _scale = scale; }
         void setBaselineDistance(int d) { _baselineDistance = d; }
         void setBaselineDistance(int d) { _baselineDistance = d; }
 
 

+ 1 - 0
oxygine/src/oxygine/utils/AtlasBuilder.cpp

@@ -113,6 +113,7 @@ namespace oxygine
     void MultiAtlas::clean()
     void MultiAtlas::clean()
     {
     {
         _free.clear();
         _free.clear();
+        _bounds = Rect(0, 0, 0, 0);
     }
     }
 
 
     void MultiAtlas::init(int skipSize)
     void MultiAtlas::init(int skipSize)