XieRotate(3X) — Subroutines
Digital
NAME
XieRotate − This routine creates a rotated copy of a source image.
C Format
dst_photo_id = XieRotate(src_id, angle, width, height, fill)
C Argument Information
XiePhoto dst_photo_id;
XiePhoto src_id;
double angle;
unsigned long width;
unsigned long height;
unsigned long ∗fill;
RETURN VALUES
If the source image is an unbound photomap, the routine returns the identifier of the destination image in the dst_photo_id argument. Otherwise, the routine returns the identifier of the photoflo to which the processing element is appended. You can free the image using the XieFreeResource routine.
PARAMETERS
src_idThe src_id argument specifies the identifier of the source image. The source image can be an unbound photomap, a photoflo, a phototap, of a photomap bound to the photoflo. If the source image is an unbound photomap, the operation is performed immediately. Otherwise, a processing element is appended to the photoflo with execution pending a call to the XieExecuteFlo routine. The photoflo is specified explicitly if the source image is a photoflo, or implicitly if the source image is a phototap or a bound photomap.
angleThe angle argument specifies the rotation angle in degrees. A positive angle results in clockwise rotation. The axis of rotation is the z-axis, which passes through the geometric center of the source image.
widthThe width argument specifies the width of the destination image in pixels. If you specify a value of 0, the routine adjusts the width of the destination image so that the rotated image fits exactly without clipping off its corners.
heightThe height argument specifies the height of the destination image in scanlines. If you specify a value of 0, the routine adjusts the height of the destination image so that the rotated image fits exactly without clipping off its corners.
fillThe fill argument specifies a pointer to an array of pixel values the routine uses for each component to fill those areas that do not map within the source image. For example, you could specify array entries of fill[0]=pixel_value, fill[1]=pixel_value, and fill[2]=pixel_value. If you specify a null value, the routine uses a default pixel value representing maximum intensity (white).
DESCRIPTION
This routine creates a rotated copy of a source image.
If the operation is performed immediately and you selected computation events using the XieSelectEvents routine, the routine adds an XieM_ComputationEvent to the X11 event queue when the routine is completed.
XIE Events and Error Messages
Protocol Messages: X_ieRotate
X_ieQueryResource if the fill argument is null
XIE event returned: XieK_ComputationEvent if immediate execution and computation events selected
XieLib errors: Returns null if the fill argument is null and source image is invalid
XieServer errors: BadIDChoice -- Invalid identifier
BadAlloc -- Insufficient server resources