Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

BitmapSourceExtensions.CopyTo Method (BitmapSource, Texture2D, Int32, Nullable<Rectangle>, Int32, Int32)

Silverlight

Copies a sub-region of bitmap to a sub-region of the texture.

Namespace:  System.Windows.Media.Imaging
Assembly:  System.Windows.Xna (in System.Windows.Xna.dll)
public static void CopyTo(
	this BitmapSource bitmap,
	Texture2D dest,
	int level,
	Nullable<Rectangle> srcRect,
	int destX,
	int destY
)

Parameters

bitmap
Type: System.Windows.Media.Imaging.BitmapSource
The bitmap image object.
dest
Type: Microsoft.Xna.Framework.Graphics.Texture2D
The texture.
level
Type: System.Int32
Mipmap level.
srcRect
Type: System.Nullable<Rectangle>
The region of the bitmap image to use.
destX
Type: System.Int32
The x-coordinate of the position of the texture to copy the sub-region of the bitmap to.
destY
Type: System.Int32
The y-coordinate of the position of the texture to copy the sub-region of the bitmap to.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type BitmapSource. When you use instance method syntax to call this method, omit the first parameter.

The area of the bitmap image defined by srcRect is copied to the destination texture at position (destX, destY).

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.