示例#1
0
        public SDL_FontSurface(SDL_Display owner, System.Drawing.Font font)
        {
            // TODO: Fix this somehow.
            mFont = new SdlDotNet.Font(@"C:\Windows\Fonts\micross.ttf", (int)(font.SizeInPoints + 0.5));

            mOwner      = owner;
            mBackBuffer = mOwner.BackBuffer;

            mSprite = new SdlDotNet.Sprites.TextSprite("text", mFont);
        }
示例#2
0
        public override void Dispose()
        {
            if (mFont != null)
            {
                mFont.Dispose();
            }
            if (mSprite != null)
            {
                mSprite.Dispose();
            }

            mOwner      = null;
            mFont       = null;
            mBackBuffer = null;
            mSprite     = null;
        }