|
Name |
RFont |
Examples |
None available |
Description |
RShape is a reduced interface for creating, holding and drawing text from TrueType Font files. It's a basic interpreter of TrueType fonts enabling to access any String in the form of a group of shapes. Enabling us in this way to acces their geometry. |
Constructors |
RFont(parent, fontPath, size, align);
RFont(parent, fontPath, size);
RFont(parent, fontPath);
|
Parameters |
parent |
|
PApplet, always use "this" as the value for this parameter. |
fontPath |
|
String, the name of the TrueType Font file which should be situated in the data folder of the sketch. |
size |
|
int, the point size of the font in points. |
align |
|
int, this can only take the following values: RFont.LEFT, RFont.CENTER and RFont.RIGHT. |
|
Fields |
align |
|
The alignement of the font. This proprety can take the following values: RFont.LEFT, RFont.CENTER and RFont.RIGHT
|
size |
|
The point size of the font.
|
|
Methods |
draw ( ) |
|
Use this method to draw a character on a certain canvas.
|
setAlign ( ) |
|
Use this method to reset the alignement of the font. This proprety can take the following values: RFont.LEFT, RFont.CENTER and RFont.RIGHT
|
setSize ( ) |
|
Use this method to reset the point size of the font.
|
toGroup ( ) |
|
Use this method to get the outlines of a string in the form of an RGroup. All the elements of the group will be RShapes.
|
toPolygon ( ) |
|
Use this method to get the outlines of a character in the form of an RPolygon.
|
toShape ( ) |
|
Use this method to get the outlines of a character in the form of an RShape.
|
|
Usage |
Geometry |
Related |
RGroup
|