MbufCopyClip()函数

Synopsis

Copy buffer, clipping data outside the destination buffer.

Format

void MbufCopyClip(SrcBufId, DestBufId, DestOffX, DestOffY)

MIL_ID SrcBufId; Source buffer identifier
MIL_ID DestBufId; Destination buffer identifier
long DestOffX; X pixel offset relative to destination buffer
long DestOffY; Y pixel offset relative to destination buffer

Description

This function copies the source buffer data to the destination buffer starting at the specified offset. Data outside of the destination buffer is not copied (it is clipped).

The SrcBufId and DestBufId parameters specify the identifiers of the source and destination data buffers.

The DestOffX and DestOffY parameters specify the horizontal and vertical pixel offsets of the destination buffer area at which to start copying data. Specify offsets in relation to the top-left corner of the destination buffer (0,0). These two parameters can be set to negative values and can be specified anywhere outside the destination buffer. Data extending beyond the limits of the destination buffer is not copied (it is clipped).

If the source buffer depth is greater than that of the destination, the most significant bits are truncated when the data is copied to the destination. If the destination depth is greater than that of the source, the source data is zero or sign-extended (depending on the type of the source) when copied to the destination.

Note, when copying from a non-binary buffer to a binary buffer, all non-zero pixels in the source buffer are represented as ones (1) in the binary buffer.

See also

MbufCopy, MbufCopyCond, MbufCopyMask

《MbufCopyClip()函数》上有26条评论

评论已关闭。