mediaLib Library Functions mlibImageSetSubimageStruct(3MLIB)
NAME
mlibImageSetSubimageStruct - set sub-image data structure
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
mlibstatus mlibImageSetSubimageStruct(mlibimage *subimg,
const mlibimage *img, mlibs32 x, mlibs32 y,
mlibs32 w, mlibs32 h);
DESCRIPTION
The mlibImageSetSubimageStruct() function sets a sub-
image's data structure using parameters supplied by the
user.
The mlibImageSetSubimageStruct() 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.
PARAMETERS
The function takes the following arguments:
subimg Pointer to the sub-image data structure.
img Pointer to the source image data structure.
x X coordinate of the left border in the source
image.
SunOS 5.11 Last change: 10 Sep 2007 1
mediaLib Library Functions mlibImageSetSubimageStruct(3MLIB)
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 set
successfully. MLIBFAILURE is returned when the image data
structure can not be set according to the parameters sup-
plied.
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),
mlibImageResetSubimageStruct(3MLIB),
mlibImageDelete(3MLIB), mlibImageSetFormat(3MLIB),
mlibImageSetPaddings(3MLIB), attributes(5)
SunOS 5.11 Last change: 10 Sep 2007 2
|