| charpath |
(String str) |
typedict.Graphics |
| |
Appends the outline of the characters in
str,
as obtained from the current
font,
to the current path.
charpath
aborts with a
nocurrentpoint
error if
path
is empty.
| |
| Example: |
The program,
import yoix.*.*;
JFrame f = {
Color background = Color.black;
Graphics graphics = {
String font = "Lucida-bold-24";
};
paint(Rectangle r) {
String text = "hello, world";
graphics { // "named block"
gsave();
rectclip(r);
translate(100, 200);
rotate(15);
scale(2, 1);
setrgbcolor(1, 0, 1);
newpath();
moveto(0, 0);
charpath(text);
fill();
grestore();
}
}
};
f.visible = TRUE;
defines a paint function in a frame that uses
charpath
and
fill
to print a text string.
What happens when you use
stroke
instead of
fill?
| | |
| Return: |
none
| | |
| See Also: |
ashow,
awidthshow,
imagepath,
kshow,
show,
showimage,
stringadvance,
stringbounds,
stringwidth,
widthshow
|
|
Yoix is a registered trademark of AT&T Inc.
|