'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_ImageCopyArea 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_ImageCopyArea \- copy an area .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_status\fR \fBmlib_ImageCopyArea\fR(\fBmlib_image *\fR\fIimg\fR, \fBmlib_s32\fR \fIx\fR, \fBmlib_s32\fR \fIy\fR, \fBmlib_s32\fR \fIw\fR, \fBmlib_s32\fR \fIh\fR, \fBmlib_s32\fR \fIdx\fR, \fBmlib_s32\fR \fIdy\fR); .fi .SH DESCRIPTION .sp .LP The \fBmlib_ImageCopyArea()\fR function copies a specified rectangular area from one portion of the image to another portion of the same image. The data type of the image can be \fBMLIB_BIT\fR, \fBMLIB_BYTE\fR, \fBMLIB_SHORT\fR, \fBMLIB_USHORT\fR, \fBMLIB_INT\fR, \fBMLIB_FLOAT\fR, or \fBMLIB_DOUBLE\fR. .sp .LP It uses the following equation: .sp .in +2 .nf img[x+dx+i][y+dy+j][i] = img[x+i][y+j][i] .fi .in -2 .sp .LP where \fBi = 0, 1, ..., w-1; j = 0, 1, ..., h-1\fR. .SH PARAMETERS .sp .LP The function takes the following arguments: .sp .ne 2 .mk .na \fB\fIimg\fR\fR .ad .RS 7n .rt Pointer to source image. .RE .sp .ne 2 .mk .na \fB\fIx\fR\fR .ad .RS 7n .rt X coordinate of the area origin in the source. .RE .sp .ne 2 .mk .na \fB\fIy\fR\fR .ad .RS 7n .rt Y coordinate of the area origin in the source. .RE .sp .ne 2 .mk .na \fB\fIw\fR\fR .ad .RS 7n .rt Width of the area to be copied. .RE .sp .ne 2 .mk .na \fB\fIh\fR\fR .ad .RS 7n .rt Height of the area to be copied. .RE .sp .ne 2 .mk .na \fB\fIdx\fR\fR .ad .RS 7n .rt Horizontal displacement in pixels of the area to be copied. .RE .sp .ne 2 .mk .na \fB\fIdy\fR\fR .ad .RS 7n .rt Vertical displacement in pixels of the area to be copied. .RE .SH RETURN VALUES .sp .LP The function returns \fBMLIB_SUCCESS\fR if successful. Otherwise it returns \fBMLIB_FAILURE\fR. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBmlib_ImageCopy\fR(3MLIB), \fBmlib_ImageCopyMask\fR(3MLIB), \fBmlib_ImageCopyMask_Fp\fR(3MLIB), \fBmlib_ImageCopySubimage\fR(3MLIB), \fBattributes\fR(5)