[]
        
(Showing Draft Content)

C1.Util.DX.Direct2D.Bitmap.CopyFromMemory

CopyFromMemory Method

CopyFromMemory(IntPtr, int)

Copies the specified region from memory into the current bitmap.

Declaration
public void CopyFromMemory(IntPtr pointer, int pitch)
Parameters
Type Name Description
IntPtr pointer

The data to copy.

int pitch

The stride, or pitch, of the source bitmap stored in srcData. The stride is the byte count of a scanline (one row of pixels in memory). The stride can be computed from the following formula: pixel width * bytes per pixel + memory padding.

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; the two bitmap formats should match. Passing this method invalid input, such as an invalid destination rectangle, can produce unpredictable results, such as a distorted image or device failure. 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}}.

CopyFromMemory(byte[], int)

Copies the specified region from memory into the current bitmap.

Declaration
public void CopyFromMemory(byte[] memory, int pitch)
Parameters
Type Name Description
byte[] memory

The data to copy.

int pitch

The stride, or pitch, of the source bitmap stored in srcData. The stride is the byte count of a scanline (one row of pixels in memory). The stride can be computed from the following formula: pixel width * bytes per pixel + memory padding.

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; the two bitmap formats should match. Passing this method invalid input, such as an invalid destination rectangle, can produce unpredictable results, such as a distorted image or device failure. 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}}.

CopyFromMemory<T>(T[], int)

Copies the specified region from memory into the current bitmap.

Declaration
public void CopyFromMemory<T>(T[] memory, int pitch = 0) where T : struct
Parameters
Type Name Description
T[] memory

The data to copy.

int pitch

The stride, or pitch, of the source bitmap stored in srcData. The stride is the byte count of a scanline (one row of pixels in memory). The stride can be computed from the following formula: pixel width * bytes per pixel + memory padding.

Type Parameters
Name Description
T
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; the two bitmap formats should match. Passing this method invalid input, such as an invalid destination rectangle, can produce unpredictable results, such as a distorted image or device failure. 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}}.

CopyFromMemory(IntPtr, int, RectL)

Copies the specified region from memory into the current bitmap.

Declaration
public void CopyFromMemory(IntPtr pointer, int pitch, RectL destinationArea)
Parameters
Type Name Description
IntPtr pointer

The data to copy.

int pitch

The stride, or pitch, of the source bitmap stored in srcData. The stride is the byte count of a scanline (one row of pixels in memory). The stride can be computed from the following formula: pixel width * bytes per pixel + memory padding.

RectL destinationArea

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; the two bitmap formats should match. Passing this method invalid input, such as an invalid destination rectangle, can produce unpredictable results, such as a distorted image or device failure. 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}}.

CopyFromMemory(byte[], int, RectL)

Copies the specified region from memory into the current bitmap.

Declaration
public void CopyFromMemory(byte[] memory, int pitch, RectL destinationArea)
Parameters
Type Name Description
byte[] memory

The data to copy.

int pitch

The stride, or pitch, of the source bitmap stored in srcData. The stride is the byte count of a scanline (one row of pixels in memory). The stride can be computed from the following formula: pixel width * bytes per pixel + memory padding.

RectL destinationArea

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; the two bitmap formats should match. Passing this method invalid input, such as an invalid destination rectangle, can produce unpredictable results, such as a distorted image or device failure. 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}}.

CopyFromMemory<T>(T[], int, RectL)

Copies the specified region from memory into the current bitmap.

Declaration
public void CopyFromMemory<T>(T[] memory, int pitch, RectL destinationArea) where T : struct
Parameters
Type Name Description
T[] memory

The data to copy.

int pitch

The stride, or pitch, of the source bitmap stored in srcData. The stride is the byte count of a scanline (one row of pixels in memory). The stride can be computed from the following formula: pixel width * bytes per pixel + memory padding.

RectL destinationArea

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

Type Parameters
Name Description
T
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; the two bitmap formats should match. Passing this method invalid input, such as an invalid destination rectangle, can produce unpredictable results, such as a distorted image or device failure. 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}}.

CopyFromMemory(RectL?, IntPtr, int)

HRESULT ID2D1Bitmap::CopyFromMemory([In, Optional] const D2D_RECT_U* dstRect,[In] const void* srcData,[In] unsigned int pitch)

Declaration
public void CopyFromMemory(RectL? dstRect, IntPtr srcData, int pitch)
Parameters
Type Name Description
RectL? dstRect
IntPtr srcData
int pitch