示例#1
0
        //DoubleCheck this
        public static void Remove(Font pFNode)
        {
            Debug.Assert(pFNode != null);
            FontMan pFMan = FontMan.PrivGetInstance();

            pFMan.BaseRemove(pFNode);
        }
示例#2
0
        public static void Remove(Glyph pNode)
        {
            Debug.Assert(pNode != null);
            FontMan pMan = FontMan.PrivGetInstance();

            pMan.BaseRemove(pNode);
        }
示例#3
0
        public static void DumpFonts()
        {
            FontMan pFMan = FontMan.PrivGetInstance();

            Debug.Assert(pFMan != null);

            Debug.WriteLine("------ Fontzee ------");
            pFMan.BaseDumpNodes();
        }
示例#4
0
        public static void Dump()
        {
            FontMan pMan = FontMan.PrivGetInstance();

            Debug.Assert(pMan != null);

            Debug.WriteLine("------ Font Manager ------");
            pMan.BaseDump();
        }
示例#5
0
        public static Font Find(Font.Name name)
        {
            FontMan pFMan = FontMan.PrivGetInstance();

            pFMan.pRefNode.name = name;

            Font pFontData = (Font)pFMan.BaseFind(pFMan.pRefNode);

            return(pFontData);
        }
示例#6
0
        private void PrivStatDump()
        {
            FontMan pFMan = FontMan.PrivGetInstance();

            Debug.Assert(pFMan != null);

            Debug.WriteLine("");
            Debug.WriteLine("Font Manager Stats---------------------");
            pFMan.BaseStatDump();
        }
示例#7
0
        public static Font Find(Font.Name name)
        {
            FontMan pMan = FontMan.PrivGetInstance();

            // Compare functions only compares two Nodes
            pMan.pRefNode.name = name;

            Font pData = (Font)pMan.BaseFind(pMan.pRefNode);

            return(pData);
        }
示例#8
0
        public static void Destroy()
        {
            // Get the instance
            FontMan pMan = FontMan.PrivGetInstance();

#if (TRACK_DESTRUCTOR)
            Debug.WriteLine("--->FontMan.Destroy()");
#endif
            pMan.BaseDestroy();
            pMan.pRefNode     = null;
            FontMan.pInstance = null;
        }
示例#9
0
        public static Font Add(Font.Name name, SpriteBatch.Name SB_Name, String pMessage, Glyph.Name glyphName, float xStart, float yStart)
        {
            FontMan pMan = FontMan.PrivGetInstance();

            Font pNode = (Font)pMan.BaseAdd();

            Debug.Assert(pNode != null);

            pNode.Set(name, pMessage, glyphName, xStart, yStart);

            // Add to sprite batch
            SpriteBatch pSB = SpriteBatchMan.Find(SB_Name);

            Debug.Assert(pSB != null);
            Debug.Assert(pNode.pFontSprite != null);
            pSB.Attach(pNode.pFontSprite);

            return(pNode);
        }
示例#10
0
        public static void Destroy()
        {
            FontMan pFMan = FontMan.PrivGetInstance();

            Debug.Assert(pFMan != null);

            pFMan.PrivStatDump();

#if (TRACK_DESTRUCTOR_MAN)
            Debug.WriteLine("FontMan.Destroy()");
#endif
            pFMan.BaseDestroy();

#if (TRACK_DESTRUCTOR_MAN)
            Debug.WriteLine("     {0} ({1})", pFMan.pRefNode, pFMan.pRefNode.GetHashCode());
            Debug.WriteLine("     {0} ({1})", FontMan.pInstance, FontMan.pInstance.GetHashCode());
#endif
            pFMan.pRefNode    = null;
            FontMan.pInstance = null;
        }
示例#11
0
        public static Font Add(Font.Name name, SpriteBatch.Name SB_Name, String pMessage, Glyph.Name glyphName, float x, float y)
        {
            FontMan pFMan = FontMan.PrivGetInstance();

            Debug.Assert(pFMan != null);

            Font pFNode = (Font)pFMan.BaseAdd();

            Debug.Assert(pFNode != null);

            pFNode.Set(name, pMessage, glyphName, x, y);

            SpriteBatch pSpriteBatch = SpriteBatchMan.Find(SB_Name);

            Debug.Assert(pSpriteBatch != null);

            Debug.Assert(pFNode.pFontSprite != null);
            pSpriteBatch.Attach(pFNode.pFontSprite);

            return(pFNode);
        }