Click or drag to resize
CanvasDrawingSessionDrawImage Method (ICanvasImage, Rect, Rect, Single, CanvasImageInterpolation, CanvasComposite)
Draws an image.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public void DrawImage(
	ICanvasImage image,
	Rect destinationRectangle,
	Rect sourceRectangle,
	float opacity,
	CanvasImageInterpolation interpolation,
	CanvasComposite composite
)

Parameters

image
Type: Microsoft.Graphics.CanvasICanvasImage
destinationRectangle
Type: Windows.FoundationRect
sourceRectangle
Type: Windows.FoundationRect
opacity
Type: SystemSingle
interpolation
Type: Microsoft.Graphics.CanvasCanvasImageInterpolation
composite
Type: Microsoft.Graphics.CanvasCanvasComposite
Remarks
  • The area of the image specified by the source rectangle is scaled to fill the destination rectangle.
  • The source rectangle is specified in the image's coordinate system
  • If the source image is a bitmap then the source rectangle is clipped to the bounds of the bitmap.
  • The opacity parameter is a float between 0.0f and 1.0f. 1.0f is the default.
  • The interpolation parameter defaults to Linear.
  • The composite mode parameters defaults to SourceOver.
  • Because the composite mode is explicitly specified, this overload ignores the current Blend setting.
See Also