mediaLib Library Functions mlibImageResetSubimageStruct(3MLIB)
NAME
mlibImageResetSubimageStruct - reset sub-image data struc-
ture
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
mlibstatus mlibImageResetSubimageStruct(mlibimage *subimg,
const mlibimage *img, mlibs32 x, mlibs32 y,
mlibs32 w, mlibs32 h);
DESCRIPTION
The mlibImageResetSubimageStruct() function resets a sub-
image's data structure using parameters supplied by the
user.
The mlibImageResetSubimageStruct() function returns
MLIBFAILURE if the supplied parameters do not pass the fol-
lowing sanity checks:
o subimg != NUL
o img != NUL
o 0 < w < mlibImageGetWidth(img)
o 0 < h < mlibImageGetHeight(img)
o 0 < x < (mlibImageGetWidth(img) - w)
o 0 < y < (mlibImageGetHeight(img) - h)
Whenever MLIBFAILURE is returned, the original image data
structure is not changed.
If mlibImageIsUserAllocated(subimg)==0, the original data
buffer is freed, otherwise the original data buffer is not
freed.
PARAMETERS
The function takes the following arguments:
subimg Pointer to the sub-image data structure.
img Pointer to the source image data structure.
SunOS 5.11 Last change: 10 Sep 2007 1
mediaLib Library Functions mlibImageResetSubimageStruct(3MLIB)
x X coordinate of the left border in the source
image.
y Y coordinate of the top border in the source
image.
w Width of the sub-image.
h Height of the sub-image.
RETURN VALUES
MLIBSUCES is returned if the image data structure is
reset successfully. MLIBFAILURE is returned when the image
data structure can not be reset according to the parameters
supplied.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
mlibImageCreate(3MLIB), mlibImageCreateSubimage(3MLIB),
mlibImageCreateStruct(3MLIB), mlibImageSetStruct(3MLIB),
mlibImageResetStruct(3MLIB),
mlibImageSetSubimageStruct(3MLIB), mlibImageDelete(3MLIB),
mlibImageSetFormat(3MLIB), mlibImageSetPaddings(3MLIB),
attributes(5)
SunOS 5.11 Last change: 10 Sep 2007 2
|