[]
        
(Showing Draft Content)

C1.Util.DX.Direct2D.Bitmap.CopyFromRenderTarget

CopyFromRenderTarget Method

CopyFromRenderTarget(RenderTarget)

Copies the specified region from the specified render target into the current bitmap.

Declaration
public void CopyFromRenderTarget(RenderTarget renderTarget)
Parameters
Type Name Description
RenderTarget renderTarget

The render target that contains the region to copy.

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 int 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.

CopyFromRenderTarget(RenderTarget, Point2L)

Copies the specified region from the specified render target into the current bitmap.

Declaration
public void CopyFromRenderTarget(RenderTarget renderTarget, Point2L destinationPoint)
Parameters
Type Name Description
RenderTarget renderTarget

The render target that contains the region to copy.

Point2L destinationPoint

In the current bitmap, the upper-left corner of the area to which the region specified by srcRect is copied.

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 int 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.

CopyFromRenderTarget(RenderTarget, Point2L, RectL)

Copies the specified region from the specified render target into the current bitmap.

Declaration
public void CopyFromRenderTarget(RenderTarget renderTarget, Point2L destinationPoint, RectL sourceArea)
Parameters
Type Name Description
RenderTarget renderTarget

The render target that contains the region to copy.

Point2L destinationPoint

In the current bitmap, the upper-left corner of the area to which the region specified by srcRect is copied.

RectL sourceArea

The area of renderTarget to copy.

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 int 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.

CopyFromRenderTarget(Point2L?, RenderTarget, RectL?)

HRESULT ID2D1Bitmap::CopyFromRenderTarget([In, Optional] const D2D_POINT_2U* destPoint,[In] ID2D1RenderTarget* renderTarget,[In, Optional] const D2D_RECT_U* srcRect)

Declaration
public void CopyFromRenderTarget(Point2L? destPoint, RenderTarget renderTarget, RectL? srcRect)
Parameters
Type Name Description
Point2L? destPoint
RenderTarget renderTarget
RectL? srcRect