SharpDX.Mathematics.Interop.RawPoint offset;
this.Surface = this.SurfaceImageNative.BeginDraw(
new SharpDX.Rectangle(0, 0, (int)this.Size.Width, (int)this.Size.Height), out offset);
- float dpix, dpiy;
- this.GetDpi(out dpix, out dpiy);
- D2D.BitmapProperties1 prop = new D2D.BitmapProperties1(new D2D.PixelFormat(DXGI.Format.B8G8R8A8_UNorm, D2D.AlphaMode.Premultiplied),
- dpix, dpiy, D2D.BitmapOptions.Target | D2D.BitmapOptions.CannotDraw);
- this.Bitmap = new D2D.Bitmap1(this.D2DContext, this.Surface, prop);
+ this.Bitmap = new D2D.Bitmap1(this.D2DContext, this.Surface, null);
this.D2DContext.Target = this.Bitmap;
this.D2DContext.Transform = Matrix3x2.Translation(offset.X, offset.Y);
base.BegineDraw();