| eofill |
([double alpha [, int clear]]) |
typedict.Graphics |
| |
Fills the current
path
on
drawable
by painting the interior, which is identified using the even-odd winding rule,
using
foreground
and the optional
alpha
argument, which should be a number between
0.0
and
1.0
(the default) as the alpha value.
The
path
is automatically cleared after being drawn unless the optional
clear
argument in zero, but it can also be preserved using
gsave
and
grestore.
| |
| Example: |
The program,
import yoix.*.*;
JFrame f = {
paint(Rectangle r) {
graphics { // "named block"
gsave();
rectclip(r);
translate(144, 144);
moveto(0, -50);
lineto(29, 40);
lineto(-47, -15);
lineto(47, -15);
lineto(-29, 40);
closepath();
setcmykcolor(1, 1, 0, 0); // blue
gsave();
eofill();
grestore();
setrgbcolor(0, 1, 0);
stroke();
grestore();
}
}
};
f.visible = TRUE;
defines a paint function in a frame that creates a path that looks
like a star, fills it with blue using
eofill,
and then draws the outline in green.
Notice how we surrounded
eofill
with an extra
gsave
and
grestore,
which preserved the path so we could draw the outline using
stroke.
| | |
| Return: |
none
| | |
| See Also: |
clip,
clippath,
drawablebbox,
eoclip,
eoerase,
erase,
erasedrawable,
fill,
ineofill,
infill,
instroke,
rectbutton,
rectclip,
rectcopy,
recterase,
rectfill,
rectmove,
rectstroke,
stroke,
strokepath
|
|
Yoix is a registered trademark of AT&T Inc.
|