Share via


BitmapContent.TryCopyFrom Method

Attempts to copy a region from a specified bitmap.

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

Syntax

protected virtual abstract bool TryCopyFrom (
         BitmapContent sourceBitmap,
         Rectangle sourceRegion,
         Rectangle destinationRegion
)

Parameters

  • sourceBitmap
    BitmapContent being copied.
  • sourceRegion
    Location of sourceBitmap.
  • destinationRegion
    Region of destination bitmap to be overwritten.

Return Value

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.

See Also

Reference

BitmapContent Class
BitmapContent Members
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace

Platforms

Windows XP SP2, Windows Vista