Text


Object Hierarchy:

Object hierarchy for Text

Description:

[ Compact ]
[ Immutable ]
[ CCode ( cname = "sfText" , copy_function = "sfText_copy" , cprefix = "sfText_" , free_function = "sfText_destroy" ) ]
public class Text : Shape

Graphical text that can be drawn to a render target

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);


Namespace: sf
Package: sfml

Content:

Properties:

Creation methods:

Methods:

Inherited Members: