/// <summary> /// Creates a new D2dBitmapGraphics with specified DIP size for use during intermediate offscreen drawing /// that is compatible with the current D2dGraphics and has the same DPI, and pixel format /// as the current D2dGraphics and with the specified options</summary> /// <param name="size">The desired size of the new D2dGraphics in pixels</param> /// <param name="options">Whether the new D2dBitmapGraphics must be compatible with GDI</param> /// <returns>D2dBitmapGraphics with specified DIP size for use during intermediate offscreen drawing</returns> public D2dBitmapGraphics CreateCompatibleGraphics(SizeF size, D2dCompatibleGraphicsOptions options) { var rt = new BitmapRenderTarget(m_renderTarget, (CompatibleRenderTargetOptions)options, size.ToSharpDX(), null, null); return new D2dBitmapGraphics(this, rt); }
/// <summary> /// Creates a new D2dBitmapGraphics for use during intermediate offscreen drawing /// that is compatible with the current D2dGraphics and has the same size, DPI, and pixel format /// as the current D2dGraphics and with the specified options</summary> /// <param name="options">Whether the new D2dBitmapGraphics must be compatible with GDI</param> /// <returns>D2dBitmapGraphics for use during intermediate offscreen drawing</returns> public D2dBitmapGraphics CreateCompatibleGraphics(D2dCompatibleGraphicsOptions options) { var rt = new BitmapRenderTarget(m_renderTarget, (CompatibleRenderTargetOptions)options); return new D2dBitmapGraphics(this, rt); }
/// <summary> /// Creates a new D2dBitmapGraphics with specified pixel size for use during intermediate offscreen drawing /// that is compatible with the current D2dGraphics and has the same DPI, and pixel format /// as the current D2dGraphics and with the specified options</summary> /// <param name="pixelSize">The desired size of the new D2dGraphics in pixels</param> /// <param name="options">Whether the new D2dBitmapGraphics must be compatible with GDI</param> /// <returns>D2dBitmapGraphics with specified pixel size for use during intermediate offscreen drawing</returns> public D2dBitmapGraphics CreateCompatibleGraphics(Size pixelSize, D2dCompatibleGraphicsOptions options) { var dsize = new Size2(pixelSize.Width, pixelSize.Height); var rt = new BitmapRenderTarget(m_renderTarget, (CompatibleRenderTargetOptions)options, null, dsize, null); return new D2dBitmapGraphics(this, rt); }
/// <summary> /// Creates a new D2dBitmapGraphics with specified DIP size for use during intermediate offscreen drawing /// that is compatible with the current D2dGraphics and has the same DPI, and pixel format /// as the current D2dGraphics and with the specified options</summary> /// <param name="size">The desired size of the new D2dGraphics in pixels</param> /// <param name="options">Whether the new D2dBitmapGraphics must be compatible with GDI</param> public D2dBitmapGraphics CreateCompatibleGraphics(SizeF size, D2dCompatibleGraphicsOptions options) { var dsize = new DrawingSizeF(size.Width, size.Height); var rt = new BitmapRenderTarget(m_renderTarget, (CompatibleRenderTargetOptions)options, dsize, null, null); return new D2dBitmapGraphics(rt); }