RenderTargetBitmap Class

Summary

A bitmap that holds the rendering of a IVisual.
Namespace
Avalonia.Media.Imaging
Interfaces
Base Types
graph BT Type-->Base0["Bitmap"] click Base0 "/api/Avalonia.Media.Imaging/Bitmap" Base0-->Base1["object"] Type-.->Interface0["IBitmap"] click Interface0 "/api/Avalonia.Media.Imaging/IBitmap" Type-.->Interface1["IImage"] click Interface1 "/api/Avalonia.Media/IImage" Type-.->Interface2["IRenderTarget"] click Interface2 "/api/Avalonia.Platform/IRenderTarget" Type-.->Interface3["IDisposable"] Type["RenderTargetBitmap"] class Type type-node

Syntax

public class RenderTargetBitmap : Bitmap, IBitmap, IImage, IRenderTarget, IDisposable

Constructors

Name Summary
RenderTargetBitmap(PixelSize) Initializes a new instance of the RenderTargetBitmap class.
RenderTargetBitmap(PixelSize, Vector) Initializes a new instance of the RenderTargetBitmap class.

Properties

Name Value Summary
Dpi Vector
Gets the dots per inch (DPI) of the image.
Inherited from Bitmap
PixelSize PixelSize
Gets the size of the bitmap, in device pixels.
Inherited from Bitmap
PlatformImpl IRef<IRenderTargetBitmapImpl>
Gets the platform-specific bitmap implementation.
PlatformImpl IRef<IBitmapImpl>
Gets the platform-specific bitmap implementation.
Inherited from Bitmap
Size Size
Gets the size of the image, in device independent pixels.
Inherited from Bitmap

Methods

Name Value Summary
CreateDrawingContext(IVisualBrushRenderer) IDrawingContextImpl
Creates an IDrawingContextImpl for a rendering session.
CreateScaledBitmap(PixelSize, BitmapInterpolationMode) Bitmap
Creates a Bitmap scaled to a specified size from the current bitmap.
Inherited from Bitmap
DecodeToHeight(Stream, int, BitmapInterpolationMode) Bitmap
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
static
DecodeToWidth(Stream, int, BitmapInterpolationMode) Bitmap
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
static
Dispose() void
Inherited from Bitmap
Render(IVisual) void
Renders a visual to the RenderTargetBitmap.
Save(Stream) void
Saves the bitmap to a stream.
Inherited from Bitmap
Save(string) void
Saves the bitmap to a file.
Inherited from Bitmap