Click or drag to resize
CanvasBitmap.CopyPixelsFromBitmap Method (CanvasBitmap, Int32, Int32, Int32, Int32, Int32, Int32)
Copies the specified region of a bitmap into this bitmap, at the point specified.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public void CopyPixelsFromBitmap(
	CanvasBitmap otherBitmap,
	int destX,
	int destY,
	int sourceRectLeft,
	int sourceRectTop,
	int sourceRectWidth,
	int sourceRectHeight
)

Parameters

otherBitmap
Type: Microsoft.Graphics.Canvas.CanvasBitmap
destX
Type: System.Int32
destY
Type: System.Int32
sourceRectLeft
Type: System.Int32
sourceRectTop
Type: System.Int32
sourceRectWidth
Type: System.Int32
sourceRectHeight
Type: System.Int32
Remarks

The region must be able to fit, and the pixel formats of the two bitmaps must match. The destination point and source region are specified in pixels (not DIPs).

It's an error to copy a bitmap onto itself.

This method is most efficient when both bitmaps were created from the same CanvasDevice, but is also able to copy between bitmaps of different devices.

See Also