[ Compact ]
[ Immutable ]
[ CCode ( cname = "sfText" , copy_function = "sfText_copy" , cprefix = "sfText_" , free_function = "sfText_destroy" ) ]
public class Text : Shape
To draw text, you will be using the sf.Text class. It's very simple to use:
var font = new Font.fromFile("../data/Arial.ttf"); //simple font
var text = new Text(font) {
string = "Hello world",
};
// set the color
text.setCharacterSize(24); // in pixels, not points!
// set the text style
text.setStyle(TextSyle.Bold | TextStyle.Underlined);
text.draw (window);