internal Direct2DTexture2D(IRenderTarget InRenderTarget, Bitmap InBitmap) { Direct2DResourceManager.OnResourceCreate(this); Direct2DRenderTarget RT = InRenderTarget as Direct2DRenderTarget; Texture2D = CreateFromBitmap(RT.RenderTarget, InBitmap); }
public void Dispose() { Direct2DResourceManager.OnResourceDestroy(this); if (Texture2D != null) { Texture2D.Dispose(); Texture2D = null; } if (fConverter != null) { fConverter.Dispose(); fConverter = null; } if (BFDecorde != null) { BFDecorde.Dispose(); BFDecorde = null; } if (BitDecorder != null) { BitDecorder.Dispose(); BitDecorder = null; } if (MemStream != null) { MemStream.Dispose(); MemStream = null; } }
internal Direct2DTexture2D(IRenderTarget InRenderTarget, string InFilePath) { Direct2DResourceManager.OnResourceCreate(this); Direct2DRenderTarget RT = InRenderTarget as Direct2DRenderTarget; var bitmap = (System.Drawing.Bitmap)System.Drawing.Image.FromFile(InFilePath); Texture2D = CreateFromBitmap(RT.RenderTarget, bitmap); }
public void Dispose() { Direct2DResourceManager.OnResourceDestroy(this); if (Texture2D != null) { Texture2D.Dispose(); Texture2D = null; } }