private void Dispose(bool disposing) { if (this.disposed || this.callFromImage) { return; } this.surface?.Dispose(); this.surface = (System.Drawing.Internal.Bitmap)null; this.disposed = true; }
public BitmapHelper(Graphics g) { this.g = g; this.surface = BitmapHelper.Extract(g); /* * Assembly assembly = Assembly.LoadFrom("mytest.dll"); * object mc = assembly.CreateInstance("MyTest.MyClass"); * Type t = mc.GetType(); * BindingFlags bf = BindingFlags.Instance | BindingFlags.NonPublic; * MethodInfo mi = t.GetMethod("MyMethod", bf); * mi.Invoke(mc, null);*/ }
public extern void DrawImage(int xDst, int yDst, System.Drawing.Internal.Bitmap bitmap, int xSrc, int ySrc, int width, int height, ushort opacity);
public extern void StretchImage(int xDst, int yDst, int widthDst, int heightDst, System.Drawing.Internal.Bitmap bitmap, int xSrc, int ySrc, int widthSrc, int heightSrc, ushort opacity);
public extern void Scale9Image(int xDst, int yDst, int widthDst, int heightDst, System.Drawing.Internal.Bitmap bitmap, int leftBorder, int topBorder, int rightBorder, int bottomBorder, ushort opacity);
public Bitmap(System.Drawing.Graphics g) { this.g = g; this.surface = Extract(g); }
internal Graphics(System.Drawing.Internal.Bitmap bmp, IntPtr hdc) { this.surface = bmp; this.hdc = hdc; }
public BitmapHelper(Graphics g) { this.g = g; this.surface = BitmapHelper.Extract(g); }