Class RenderTargetBitmap
A bitmap that holds the rendering of a Visual.
public class RenderTargetBitmap : Bitmap, IImage, IDisposable, IImageBrushSource
- Inheritance
-
RenderTargetBitmap
- Implements
- Inherited Members
Constructors
RenderTargetBitmap(PixelSize)
Initializes a new instance of the RenderTargetBitmap class.
public RenderTargetBitmap(PixelSize pixelSize)
Parameters
pixelSize
PixelSizeThe size of the bitmap.
RenderTargetBitmap(PixelSize, Vector)
Initializes a new instance of the RenderTargetBitmap class.
public RenderTargetBitmap(PixelSize pixelSize, Vector dpi)
Parameters
Methods
CreateDrawingContext()
Creates a DrawingContext for drawing to the RenderTargetBitmap. Clears the current image data to transparent.
public DrawingContext CreateDrawingContext()
Returns
- DrawingContext
The drawing context.
CreateDrawingContext(bool)
Creates a DrawingContext for drawing to the RenderTargetBitmap.
public DrawingContext CreateDrawingContext(bool clear)
Parameters
clear
boolIf true, clears the current image data to transparent, if false, leaves the image data unchanged.
Returns
- DrawingContext
The drawing context.
Dispose()
public override void Dispose()
Render(Visual)
Renders a visual to the RenderTargetBitmap.
public void Render(Visual visual)
Parameters
visual
VisualThe visual to render.