BitmapContent.TryCopyFrom Method
Note
This method is available only when developing for Windows.
Attempts to copy a region from a specified bitmap.
Syntax
'Declaration
Protected MustOverride Function TryCopyFrom ( _
sourceBitmap As BitmapContent, _
sourceRegion As Rectangle, _
destinationRegion As Rectangle _
) As Boolean
protected abstract bool TryCopyFrom (
BitmapContent sourceBitmap,
Rectangle sourceRegion,
Rectangle destinationRegion
)
protected:
bool TryCopyFrom(
BitmapContent sourceBitmap,
Rectangle sourceRegion,
Rectangle destinationRegion
) abstract
Parameters
- sourceBitmap
Type: BitmapContent
BitmapContent being copied. - sourceRegion
Type: Rectangle
Location of sourceBitmap. - destinationRegion
Type: Rectangle
Region of destination bitmap to be overwritten.
Return Value
Type: Boolean
true if region copy is supported; false otherwise.
Remarks
This operation succeeds if the source is a PixelBitmapContent object and the copy region covers all of both bitmaps. Some bitmap subclasses may support subregion copies and/or a wider range of formats than just Vector4, but this is not required. Copy functionality is accessible using the Copy methods.
Requirements
Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)
See Also
Reference
BitmapContent Class
BitmapContent Members
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace
Platforms
Windows 7, Windows Vista, Windows XP