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); }
public override void Dispose() { if (mSurface != null) { mSurface.Dispose(); } mOwner = null; mSurface = null; mBackBuffer = null; }
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; }
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(); }
public override void Dispose() { if (mFont != null) { mFont.Dispose(); } if (mSprite != null) { mSprite.Dispose(); } mOwner = null; mFont = null; mBackBuffer = null; mSprite = null; }
public override bool Initialize(DisplayInitInfo displayType) { SDL.Video.Initialize(); mParent = displayType.Parent; if (displayType.FullScreen) { SDL.Video.SetVideoMode(displayType.Width, displayType.Height, displayType.BPP); } else { displayType.Width = mParent.ClientRectangle.Width; displayType.Height = mParent.ClientRectangle.Height; } mBackBuffer = new SDL.Surface(displayType.Width, displayType.Height); return(true); }
public SDL_Canvas(SDL.Surface surface) { mSurface = surface; }
// HACK: public void MakeCompatibleWidth(SDL_Surface surf) { mSurface = mSurface.Convert(surf.SDLSurface); mSurface.AlphaBlending = true; }