| rotatefont |
(Number angle) |
typedict.Font |
| |
Returns a new
Font
that is created by applying
a rotation of
angle
degrees to every character in this font.
The direction of the rotation takes the positive x-axis into the
positive y-axis when
angle
is positive, which is often observed as a clockwise rotation
when characters from the font are printed on your screen.
| |
| Example: |
Here is a small program,
import yoix.*.*;
Font ROT0 = {
String name = "Lucida-plain-30";
};
Font ROT180 = ROT0.rotatefont(180);
JFrame f = {
Color background = Color.white;
Graphics graphics = {
int textantialiasing = TRUE;
};
paint(Rectangle rect) {
graphics {
gsave();
moveto(36, 144);
rlineto(144, 0);
stroke();
rectclip(rect);
moveto(36, 144);
setfont(ROT0);
show("hello");
setfont(ROT180);
show("world");
grestore();
}
}
};
f.visible = TRUE;
that creates a font by applying
rotatefont
to a base font and then defines a paint function in a frame that
draws a short line that represents the baseline
and shows a few words using the available fonts.
| | |
| Return: |
Font
| | |
| See Also: |
scalefont,
shearfont,
transformfont,
translatefont
|
|
Yoix is a registered trademark of AT&T Intellectual Property.
|