Click or drag to resize
CanvasImageSource Constructor (ICanvasResourceCreator, Single, Single, Single, CanvasAlphaMode)
Initializes a new instance of the CanvasImageSource class.

Namespace:  Microsoft.Graphics.Canvas.UI.Xaml
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public CanvasImageSource(
	ICanvasResourceCreator resourceCreator,
	float width,
	float height,
	float dpi,
	CanvasAlphaMode alphaMode
)

Parameters

resourceCreator
Type: Microsoft.Graphics.Canvas.ICanvasResourceCreator
width
Type: System.Single
height
Type: System.Single
dpi
Type: System.Single
alphaMode
Type: Microsoft.Graphics.Canvas.CanvasAlphaMode
Remarks

Size is in device independent pixels (DIPs), using the specified DPI.

The alphaMode parameter determines whether the background of the image source is opaque or not. An opaque image source is slightly more efficient than a transparent image source. CanvasAlphaMode.Ignore indicates an opaque background, while CanvasAlphaMode.Premultiplied indicates a transparent background. Passing CanvasAlphaMode.Straight to this parameter will result in an error.

See Also