RenderTargetBitmap Class
Definition
A bitmap that holds the rendering of a Avalonia.Visual.
public class RenderTargetBitmap
Constructors
| Name | Description |
|---|---|
| RenderTargetBitmap (2 overloads) | Initializes a new instance of the Avalonia.Media.Imaging.RenderTargetBitmap class. |
RenderTargetBitmap overloads
RenderTargetBitmap Constructor
Initializes a new instance of the Avalonia.Media.Imaging.RenderTargetBitmap class.
public RenderTargetBitmap(Avalonia.PixelSize pixelSize)
Parameters
pixelSize Avalonia.PixelSize
The size of the bitmap.
RenderTargetBitmap Constructor
Initializes a new instance of the Avalonia.Media.Imaging.RenderTargetBitmap class.
public RenderTargetBitmap(Avalonia.PixelSize pixelSize, Avalonia.Vector dpi)
Parameters
pixelSize Avalonia.PixelSize
The size of the bitmap in device pixels.
dpi Avalonia.Vector
The DPI of the bitmap.
Methods
| Name | Description |
|---|---|
| CreateDrawingContext (2 overloads) | Creates a Avalonia.Media.DrawingContext for drawing to the Avalonia.Media.Imaging.RenderTargetBitmap. Clears the current image data to transparent. |
| Dispose | No summary available. |
| Render | Renders a visual to the Avalonia.Media.Imaging.RenderTargetBitmap. |
| CopyPixels (2 overloads) | Inherited from Bitmap. |
| CreateScaledBitmap | Creates a Bitmap scaled to a specified size from the current bitmap. Inherited from Bitmap. |
| DecodeToHeight | Loads a Bitmap from a stream and decodes at the desired height. Aspect ratio is maintained. This is more efficient than loading and then resizing. Inherited from Bitmap. |
| DecodeToWidth | Loads a Bitmap from a stream and decodes at the desired width. Aspect ratio is maintained. This is more efficient than loading and then resizing. Inherited from Bitmap. |
| Save (2 overloads) | Inherited from Bitmap. |
CreateDrawingContext overloads
CreateDrawingContext Method
Creates a Avalonia.Media.DrawingContext for drawing to the Avalonia.Media.Imaging.RenderTargetBitmap. Clears the current image data to transparent.
public Avalonia.Media.DrawingContext CreateDrawingContext()
Returns
The drawing context.
CreateDrawingContext Method
Creates a Avalonia.Media.DrawingContext for drawing to the Avalonia.Media.Imaging.RenderTargetBitmap.
public Avalonia.Media.DrawingContext CreateDrawingContext(bool clear)
Parameters
clear bool
If true, clears the current image data to transparent, if false, leaves the image data unchanged.
Returns
The drawing context.
Dispose Method
public void Dispose()
Render Method
Renders a visual to the Avalonia.Media.Imaging.RenderTargetBitmap.
public void Render(Avalonia.Visual visual)
Parameters
visual Avalonia.Visual
The visual to render.