| Current File : //usr/share/man/man3mlib/mlib_GraphicsFillRectangle.3mlib |
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
.TH mlib_GraphicsFillRectangle 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions"
.SH NAME
mlib_GraphicsFillRectangle, mlib_GraphicsFillRectangle_8, mlib_GraphicsFillRectangle_32, mlib_GraphicsFillRectangle_X_8, mlib_GraphicsFillRectangle_X_32, mlib_GraphicsFillRectangle_B_8, mlib_GraphicsFillRectangle_B_32 \- draw filled rectangle
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ]
#include <mlib.h>
\fBmlib_status\fR \fBmlib_GraphicsFillRectangle_8\fR(\fBmlib_image *\fR\fIbuffer\fR, \fBmlib_s16\fR \fIx\fR,
\fBmlib_s16\fR \fIy\fR, \fBmlib_s32\fR \fIw\fR, \fBmlib_s32\fR \fIh\fR, \fBmlib_s32\fR \fIc\fR);
.fi
.LP
.nf
\fBmlib_status\fR \fBmlib_GraphicsFillRectangle_32\fR(\fBmlib_image *\fR\fIbuffer\fR, \fBmlib_s16\fR \fIx\fR,
\fBmlib_s16\fR \fIy\fR, \fBmlib_s32\fR \fIw\fR, \fBmlib_s32\fR \fIh\fR, \fBmlib_s32\fR \fIc\fR);
.fi
.LP
.nf
\fBmlib_status\fR \fBmlib_GraphicsFillRectangle_X_8\fR(\fBmlib_image *\fR\fIbuffer\fR, \fBmlib_s16\fR \fIx\fR,
\fBmlib_s16\fR \fIy\fR, \fBmlib_s32\fR \fIw\fR, \fBmlib_s32\fR \fIh\fR, \fBmlib_s32\fR \fIc\fR, \fBmlib_s32\fR \fIc2\fR);
.fi
.LP
.nf
\fBmlib_status\fR \fBmlib_GraphicsFillRectangle_X_32\fR(\fBmlib_image *\fR\fIbuffer\fR,
\fBmlib_s16\fR \fIx\fR, \fBmlib_s16\fR \fIy\fR, \fBmlib_s32\fR \fIw\fR, \fBmlib_s32\fR \fIh\fR, \fBmlib_s32\fR \fIc\fR,
\fBmlib_s32\fR \fIc2\fR);
.fi
.LP
.nf
\fBmlib_status\fR \fBmlib_GraphicsFillRectangle_B_8\fR(\fBmlib_image *\fR\fIbuffer\fR, \fBmlib_s16\fR \fIx\fR,
\fBmlib_s16\fR \fIy\fR, \fBmlib_s32\fR \fIw\fR, \fBmlib_s32\fR \fIh\fR, \fBmlib_s32\fR \fIc\fR, \fBmlib_s32\fR \fIa\fR);
.fi
.LP
.nf
\fBmlib_status\fR \fBmlib_GraphicsFillRectangle_B_32\fR(\fBmlib_image *\fR\fIbuffer\fR,
\fBmlib_s16\fR \fIx\fR, \fBmlib_s16\fR \fIy\fR, \fBmlib_s32\fR \fIw\fR, \fBmlib_s32\fR \fIh\fR, \fBmlib_s32\fR \fIc\fR,
\fBmlib_s32\fR \fIa\fR);
.fi
.SH DESCRIPTION
.sp
.LP
Each of the \fBmlib_GraphicsFillRectangle_*()\fR functions draws a filled rectangle with the upper-left corner at (\fIx\fR, \fIy\fR), width \fIw\fR, and height \fIh\fR.
.sp
.LP
Each of the \fBmlib_GraphicsFillRectangle_X_*()\fR functions draws a filled rectangle in Xor mode as follows:
.sp
.in +2
.nf
data[x,y] ^= c ^ c2
.fi
.in -2
.sp
.LP
Each of the \fBmlib_GraphicsFillRectangle_B_*()\fR functions draws a filled rectangle with alpha blending as follows:
.sp
.in +2
.nf
data[x,y] = (data[x,y] * (255 - a) + c * a) / 255
.fi
.in -2
.SH PARAMETERS
.sp
.LP
Each of the functions takes some of the following arguments:
.sp
.ne 2
.mk
.na
\fB\fIbuffer\fR\fR
.ad
.RS 10n
.rt
Pointer to the image into which the function is drawing.
.RE
.sp
.ne 2
.mk
.na
\fB\fIx\fR\fR
.ad
.RS 10n
.rt
X coordinate of the upper-left corner of the rectangle.
.RE
.sp
.ne 2
.mk
.na
\fB\fIy\fR\fR
.ad
.RS 10n
.rt
Y coordinate of the upper-left corner of the rectangle.
.RE
.sp
.ne 2
.mk
.na
\fB\fIw\fR\fR
.ad
.RS 10n
.rt
Width of the rectangle.
.RE
.sp
.ne 2
.mk
.na
\fB\fIh\fR\fR
.ad
.RS 10n
.rt
Height of the rectangle.
.RE
.sp
.ne 2
.mk
.na
\fB\fIc\fR\fR
.ad
.RS 10n
.rt
Color used in the drawing.
.RE
.sp
.ne 2
.mk
.na
\fB\fIc2\fR\fR
.ad
.RS 10n
.rt
Alternation color.
.RE
.sp
.ne 2
.mk
.na
\fB\fIa\fR\fR
.ad
.RS 10n
.rt
Alpha value for blending. \fB0 \(<= a \(<= 255\fR.
.RE
.SH RETURN VALUES
.sp
.LP
Each of the functions 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_GraphicsDrawRectangle\fR(3MLIB), \fBattributes\fR(5)