CanvasRenderTarget Class |
Namespace: Microsoft.Graphics.Canvas
public sealed class CanvasRenderTarget : CanvasBitmap, ICanvasImage, IGraphicsEffectSource, IDisposable, IDirect3DSurface, ICanvasResourceCreatorWithDpi, ICanvasResourceCreator
The CanvasRenderTarget type exposes the following members.
Name | Description | |
---|---|---|
CanvasRenderTarget(ICanvasResourceCreatorWithDpi, Size) | Initializes a new instance of the CanvasRenderTarget class. | |
CanvasRenderTarget(ICanvasResourceCreatorWithDpi, Single, Single) | Initializes a new instance of the CanvasRenderTarget class. | |
CanvasRenderTarget(ICanvasResourceCreator, Single, Single, Single) | Initializes a new instance of the CanvasRenderTarget class. | |
CanvasRenderTarget(ICanvasResourceCreator, Single, Single, Single, DirectXPixelFormat, CanvasAlphaMode) | Initializes a new instance of the CanvasRenderTarget class. |
Name | Description | |
---|---|---|
AlphaMode | Gets the alpha mode of this bitmap. (Inherited from CanvasBitmap.) | |
Bounds | Gets the bounds of the bitmap, in device independent pixels (DIPs). (Inherited from CanvasBitmap.) | |
Description | The description of this bitmap's underlying surface. (Inherited from CanvasBitmap.) | |
Device | The device associated with this bitmap. (Inherited from CanvasBitmap.) | |
Dpi | Gets the dots-per-inch (DPI) of this bitmap. (Inherited from CanvasBitmap.) | |
Format | Gets the pixel format of this bitmap. (Inherited from CanvasBitmap.) | |
Size | Gets the size of the bitmap, in device independent pixels (DIPs). (Inherited from CanvasBitmap.) | |
SizeInPixels | Gets the size of the bitmap, in pixels. (Inherited from CanvasBitmap.) |
Name | Description | |
---|---|---|
ConvertDipsToPixels | Converts units from device independent pixels (DIPs) to physical pixels based on the DPI of this bitmap. (Inherited from CanvasBitmap.) | |
ConvertPixelsToDips | Converts units from physical pixels to device independent pixels (DIPs) based on the DPI of this bitmap. (Inherited from CanvasBitmap.) | |
CopyPixelsFromBitmap(CanvasBitmap) | Copies the entire bitmap specified into this bitmap, at position (0, 0). (Inherited from CanvasBitmap.) | |
CopyPixelsFromBitmap(CanvasBitmap, Int32, Int32) | Copies the entire bitmap specified into this bitmap at the point specified. (Inherited from CanvasBitmap.) | |
CopyPixelsFromBitmap(CanvasBitmap, Int32, Int32, Int32, Int32, Int32, Int32) | Copies the specified region of a bitmap into this bitmap, at the point specified. (Inherited from CanvasBitmap.) | |
CreateDrawingSession | Returns a new drawing session. The drawing session draws onto the CanvasRenderTarget. | |
CreateFromDirect3D11Surface(ICanvasResourceCreator, IDirect3DSurface) | Creates a CanvasRenderTarget from an existing Direct3D graphics surface, using premultiplied alpha and default (96) DPI. | |
CreateFromDirect3D11Surface(ICanvasResourceCreator, IDirect3DSurface, Single) | Creates a CanvasRenderTarget from an existing Direct3D graphics surface, using the specified DPI and premultiplied alpha. | |
CreateFromDirect3D11Surface(ICanvasResourceCreator, IDirect3DSurface, Single, CanvasAlphaMode) | Creates a CanvasRenderTarget from an existing Direct3D graphics surface, using the specified DPI and alpha behavior. | |
Dispose | Releases all resources used by the CanvasBitmap. (Inherited from CanvasBitmap.) | |
GetBounds(ICanvasResourceCreator) | Retrieves the bounds of this CanvasBitmap. (Inherited from CanvasBitmap.) | |
GetBounds(ICanvasResourceCreator, Matrix3x2) | Retrieves the bounds of this CanvasBitmap. (Inherited from CanvasBitmap.) | |
GetPixelBytes | Returns an array of raw byte data for the entire bitmap. (Inherited from CanvasBitmap.) | |
GetPixelBytes(IBuffer) | Copies raw byte data for the entire bitmap into the specified buffer. (Inherited from CanvasBitmap.) | |
GetPixelBytes(Int32, Int32, Int32, Int32) | Returns an array of raw byte data for a subregion of the bitmap. (Inherited from CanvasBitmap.) | |
GetPixelBytes(IBuffer, Int32, Int32, Int32, Int32) | Copies raw byte data for a subregion of the bitmap into the specified buffer. (Inherited from CanvasBitmap.) | |
GetPixelColors | Returns an array of color data for the entire bitmap. (Inherited from CanvasBitmap.) | |
GetPixelColors(Int32, Int32, Int32, Int32) | Returns an array of color data for a subregion of the bitmap. (Inherited from CanvasBitmap.) | |
SaveAsync(String) | Saves the entire bitmap to a file with the specified file name, using a default quality level of 0.9 and CanvasBitmapFileFormat.Auto. (Inherited from CanvasBitmap.) | |
SaveAsync(String, CanvasBitmapFileFormat) | Saves the entire bitmap to a file with the specified file name and file format, and a default quality level of 0.9. (Inherited from CanvasBitmap.) | |
SaveAsync(IRandomAccessStream, CanvasBitmapFileFormat) | Saves the entire bitmap to the specified stream with the specified file format, using a default quality level of 0.9. (Inherited from CanvasBitmap.) | |
SaveAsync(String, CanvasBitmapFileFormat, Single) | Saves the entire bitmap to a file with the specified file name and file format, and quality level. (Inherited from CanvasBitmap.) | |
SaveAsync(IRandomAccessStream, CanvasBitmapFileFormat, Single) | Saves the entire bitmap to the specified stream with the specified file format and quality level. (Inherited from CanvasBitmap.) | |
SetPixelBytes(Byte) | Sets the byte data of the bitmap from the specified array. (Inherited from CanvasBitmap.) | |
SetPixelBytes(IBuffer) | Sets the byte data of the bitmap from the specified buffer. (Inherited from CanvasBitmap.) | |
SetPixelBytes(Byte, Int32, Int32, Int32, Int32) | Sets the byte data of a subregion of the bitmap. (Inherited from CanvasBitmap.) | |
SetPixelBytes(IBuffer, Int32, Int32, Int32, Int32) | Sets the byte data of a subregion of the bitmap from the specified buffer. (Inherited from CanvasBitmap.) | |
SetPixelColors(Color) | Sets the color data of the bitmap from the specified array. (Inherited from CanvasBitmap.) | |
SetPixelColors(Color, Int32, Int32, Int32, Int32) | Sets the color data for a subregion of the bitmap from the specified array. (Inherited from CanvasBitmap.) |
For more information about how to use CanvasRenderTarget, see "Offscreen drawing".
When using Direct2D interop, this Win2D class corresponds to an ID2D1Bitmap1 with the D2D1_BITMAP_OPTIONS_TARGET flag.