| Current File : //usr/share/man/man3mlib/mlib_ImageSetPaddings.3mlib |
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
.TH mlib_ImageSetPaddings 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions"
.SH NAME
mlib_ImageSetPaddings \- set paddings
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ]
#include <mlib.h>
\fBmlib_status\fR \fBmlib_ImageSetPaddings\fR(\fBmlib_image *\fR\fIimg\fR, \fBmlib_u8\fR \fIleft\fR,
\fBmlib_u8\fR \fItop\fR, \fBmlib_u8\fR \fIright\fR, \fBmlib_u8\fR \fIbottom\fR);
.fi
.SH DESCRIPTION
.sp
.LP
The \fBmlib_ImageSetPaddings()\fR function sets new values for the \fBpaddings\fR field of the \fBmlib_image\fR structure as follows:
.sp
.in +2
.nf
img->paddings[0] = left;
img->paddings[1] = top;
img->paddings[2] = right;
img->paddings[3] = bottom;
.fi
.in -2
.sp
.LP
By default, an image structure creation function, such as \fBmlib_ImageCreate()\fR, \fBmlib_ImageCreateStruct()\fR, or \fBmlib_ImageCreateSubimage()\fR, sets the paddings field of the mlib_image structure as follows:
.sp
.in +2
.nf
img->paddings[0] = 0;
img->paddings[1] = 0;
img->paddings[2] = 0;
img->paddings[3] = 0;
.fi
.in -2
.sp
.LP
Note that this function is needed only when the edge condition \fBMLIB_EDGE_SRC_PADDED\fR is used.
.sp
.LP
The \fBmlib_image->paddings\fR field denotes the amount of paddings on each side of an image, from which the real image border can be seen. When \fBMLIB_EDGE_SRC_PADDED\fR is specified as the edge condition, a geometric function uses the "real" source image border for clipping the destination image.
.SH PARAMETERS
.sp
.LP
The function takes the following arguments:
.sp
.ne 2
.mk
.na
\fB\fIimg\fR\fR
.ad
.RS 10n
.rt
Pointer to image data structure.
.RE
.sp
.ne 2
.mk
.na
\fB\fIleft\fR\fR
.ad
.RS 10n
.rt
Number of columns padded on the left side.
.RE
.sp
.ne 2
.mk
.na
\fB\fItop\fR\fR
.ad
.RS 10n
.rt
Number of rows padded on the top.
.RE
.sp
.ne 2
.mk
.na
\fB\fIright\fR\fR
.ad
.RS 10n
.rt
Number of columns padded on the right side.
.RE
.sp
.ne 2
.mk
.na
\fB\fIbottom\fR\fR
.ad
.RS 10n
.rt
Number of rows padded at the bottom.
.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_ImageGetPaddings\fR(3MLIB), \fBmlib_ImageCreate\fR(3MLIB), \fBmlib_ImageCreateStruct\fR(3MLIB), \fBmlib_ImageCreateSubimage\fR(3MLIB), \fBmlib_ImageAffine\fR(3MLIB), \fBattributes\fR(5)