1mlib_ImageSetSubimageStructm(e3dMiLaILBi)b Library Fumnlcitbi_oInmsageSetSubimageStruct(3MLIB)
2
3
4

NAME

6       mlib_ImageSetSubimageStruct - set sub-image data structure
7

SYNOPSIS

9       cc [ flag... ] file... -lmlib [ library... ]
10       #include <mlib.h>
11
12       mlib_status mlib_ImageSetSubimageStruct(mlib_image *subimg,
13            const mlib_image *img, mlib_s32 x, mlib_s32 y,
14            mlib_s32 w, mlib_s32 h);
15
16

DESCRIPTION

18       The  mlib_ImageSetSubimageStruct()  function  sets  a  sub-image's data
19       structure using parameters supplied by the user.
20
21
22       The mlib_ImageSetSubimageStruct() function returns MLIB_FAILURE if  the
23       supplied parameters do not pass the following sanity checks:
24
25           o      subimg != NULL
26
27           o      img != NULL
28
29           o      0 < w ≤ mlib_ImageGetWidth(img)
30
31           o      0 < h ≤ mlib_ImageGetHeight(img)
32
33           o      0 ≤ x ≤ (mlib_ImageGetWidth(img) - w)
34
35           o      0 ≤ y ≤ (mlib_ImageGetHeight(img) - h)
36
37
38       Whenever MLIB_FAILURE is returned, the original image data structure is
39       not changed.
40

PARAMETERS

42       The function takes the following arguments:
43
44       subimg    Pointer to the sub-image data structure.
45
46
47       img       Pointer to the source image data structure.
48
49
50       x         X coordinate of the left border in the source image.
51
52
53       y         Y coordinate of the top border in the source image.
54
55
56       w         Width of the sub-image.
57
58
59       h         Height of the sub-image.
60
61

RETURN VALUES

63       MLIB_SUCCESS is returned if the image data structure  is  set  success‐
64       fully.  MLIB_FAILURE  is returned when the image data structure can not
65       be set according to the parameters supplied.
66

ATTRIBUTES

68       See attributes(5) for descriptions of the following attributes:
69
70
71
72
73       ┌─────────────────────────────┬─────────────────────────────┐
74       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
75       ├─────────────────────────────┼─────────────────────────────┤
76       │Interface Stability          │Committed                    │
77       ├─────────────────────────────┼─────────────────────────────┤
78       │MT-Level                     │MT-Safe                      │
79       └─────────────────────────────┴─────────────────────────────┘
80

SEE ALSO

82       mlib_ImageCreate(3MLIB),  mlib_ImageCreateSubimage(3MLIB),  mlib_Image‐
83       CreateStruct(3MLIB),    mlib_ImageSetStruct(3MLIB),    mlib_ImageReset‐
84       Struct(3MLIB),                    mlib_ImageResetSubimageStruct(3MLIB),
85       mlib_ImageDelete(3MLIB),   mlib_ImageSetFormat(3MLIB),   mlib_ImageSet‐
86       Paddings(3MLIB), attributes(5)
87
88
89
90SunOS 5.11                        10 Sep 2007mlib_ImageSetSubimageStruct(3MLIB)
Impressum