Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public override void Dispose()
        {
            if (mSurface != null)
            {
                mSurface.Dispose();
            }

            mOwner      = null;
            mSurface    = null;
            mBackBuffer = null;
        }
Exemplo n.º 3
0
        public SDL_Surface(SDL_Display owner, Size surfaceSize)
        {
            mOwner      = owner;
            mBackBuffer = mOwner.BackBuffer;

            mSurface = new SdlDotNet.Surface(surfaceSize);
            mSurface = mSurface.Convert(owner.BackBuffer);

            //mSurface.TransparentColor = Color.FromArgb(255, 255, 0, 255);

            mSurface.AlphaBlending = true;
        }
Exemplo n.º 4
0
        public SDL_Surface(SDL_Display owner, string fileName)
        {
            mOwner      = owner;
            mBackBuffer = mOwner.BackBuffer;

            mSurface = new SdlDotNet.Surface(fileName);

            mSurface.AlphaBlending = true;
            mSurface.Alpha         = 255;


            //BlankTransparentPixels();
        }
Exemplo n.º 5
0
        public override void Dispose()
        {
            if (mFont != null)
            {
                mFont.Dispose();
            }
            if (mSprite != null)
            {
                mSprite.Dispose();
            }

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