ComponentOne Bitmap for WPF
C1.WPF.DX.4.6.2 Assembly / C1.Util.DX.Direct2D Namespace / Bitmap Class / CopyFromRenderTarget Method / CopyFromRenderTarget(RenderTarget,Point2L,RectL) Method
The render target that contains the region to copy.
In the current bitmap, the upper-left corner of the area to which the region specified by srcRect is copied.
The area of renderTarget to copy.

In This Topic
    CopyFromRenderTarget(RenderTarget,Point2L,RectL) Method
    In This Topic
    Copies the specified region from the specified render target into the current bitmap.
    Syntax
    'Declaration
     
    Public Overloads Sub CopyFromRenderTarget( _
       ByVal renderTarget As RenderTarget, _
       ByVal destinationPoint As Point2L, _
       ByVal sourceArea As RectL _
    ) 
    public void CopyFromRenderTarget( 
       RenderTarget renderTarget,
       Point2L destinationPoint,
       RectL sourceArea
    )

    Parameters

    renderTarget
    The render target that contains the region to copy.
    destinationPoint
    In the current bitmap, the upper-left corner of the area to which the region specified by srcRect is copied.
    sourceArea
    The area of renderTarget to copy.

    Return Value

    If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
    Remarks
    This method does not update the size of the current bitmap. If the contents of the source bitmap do not fit in the current bitmap, this method fails. Also, note that this method does not perform format conversion, and will fail if the bitmap formats do not match. Calling this method may cause the current batch to flush if the bitmap is active in the batch. If the batch that was flushed does not complete successfully, this method fails. However, this method does not clear the error state of the render target on which the batch was flushed. The failing System.Int32 and tag state will be returned at the next call to {{EndDraw}} or {{Flush}}. All clips and layers must be popped off of the render target before calling this method. The method returns {{D2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT}} if any clips or layers are currently applied to the render target.
    See Also