Click or drag to resize
CanvasDrawingSessionDrawImage Method (CanvasBitmap, Single, Single, Rect, Single, CanvasImageInterpolation, Matrix4x4)
Draws a bitmap.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public void DrawImage(
	CanvasBitmap bitmap,
	float x,
	float y,
	Rect sourceRectangle,
	float opacity,
	CanvasImageInterpolation interpolation,
	Matrix4x4 perspective
)

Parameters

bitmap
Type: Microsoft.Graphics.CanvasCanvasBitmap
x
Type: SystemSingle
y
Type: SystemSingle
sourceRectangle
Type: Windows.FoundationRect
opacity
Type: SystemSingle
interpolation
Type: Microsoft.Graphics.CanvasCanvasImageInterpolation
perspective
Type: System.NumericsMatrix4x4
Remarks
  • The bitmap is drawn at the specified offset.
  • The source rectangle specifies, in the bitmap's coordinate system, the area within the bitmap that will be drawn.
  • The opacity parameter is a float between 0.0f and 1.0f. 1.0f is the default.
  • The interpolation parameter defaults to Linear.
  • The perspective parameter applies an additional transform to that specified by Transform.
See Also