mediaLib Library Functions mlibGraphicsDrawRectangle(3MLIB)
NAME
mlibGraphicsDrawRectangle, mlibGraphicsDrawRectangle8,
mlibGraphicsDrawRectangle32,
mlibGraphicsDrawRectangleX8,
mlibGraphicsDrawRectangleX32,
mlibGraphicsDrawRectangleB8,
mlibGraphicsDrawRectangleB32 - draw rectangle
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include
mlibstatus mlibGraphicsDrawRectangle8(mlibimage *buffer, mlibs16 x,
mlibs16 y, mlibs32 w, mlibs32 h, mlibs32 c);
mlibstatus mlibGraphicsDrawRectangle32(mlibimage *buffer, mlibs16 x,
mlibs16 y, mlibs32 w, mlibs32 h, mlibs32 c);
mlibstatus mlibGraphicsDrawRectangleX8(mlibimage *buffer, mlibs16 x,
mlibs16 y, mlibs32 w, mlibs32 h, mlibs32 c, mlibs32 c2);
mlibstatus mlibGraphicsDrawRectangleX32(mlibimage *buffer,
mlibs16 x, mlibs16 y, mlibs32 w, mlibs32 h, mlibs32 c,
mlibs32 c2);
mlibstatus mlibGraphicsDrawRectangleB8(mlibimage *buffer, mlibs16 x,
mlibs16 y, mlibs32 w, mlibs32 h, mlibs32 c, mlibs32 a);
mlibstatus mlibGraphicsDrawRectangleB32(mlibimage *buffer,
mlibs16 x, mlibs16 y, mlibs32 w, mlibs32 h, mlibs32 c,
mlibs32 a);
DESCRIPTION
Each of the mlibGraphicsDrawRectangle*() functions draws a
rectangle with the upper-left corner at (x, y), width w, and
height h.
Each of the mlibGraphicsDrawRectangleX*() functions draws
a rectangle in Xor mode as follows:
data[x,y] ^= c ^ c2
SunOS 5.11 Last change: 2 Mar 2007 1
mediaLib Library Functions mlibGraphicsDrawRectangle(3MLIB)
Each of the mlibGraphicsDrawRectangleB*() functions draws
a rectangle with alpha blending as follows:
data[x,y] = (data[x,y] * (255 - a) ] c * a) / 255
PARAMETERS
Each of the functions takes some of the following arguments:
buffer Pointer to the image into which the function is
drawing.
x X coordinate of the upper-left corner of the rec-
tangle.
y Y coordinate of the upper-left corner of the rec-
tangle.
w Width of the rectangle.
h Height of the rectangle.
c Color used in the drawing.
c2 Alternation color.
a Alpha value for blending. 0 < a < 255.
RETURN VALUES
Each of the functions returns MLIBSUCES if successful.
Otherwise it returns MLIBFAILURE.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 2 Mar 2007 2
mediaLib Library Functions mlibGraphicsDrawRectangle(3MLIB)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
SEE ALSO
mlibGraphicsFillRectangle(3MLIB), attributes(5)
SunOS 5.11 Last change: 2 Mar 2007 3
|