A text object is drawn such that the shape's (x,y) coordinate defines the lower-left corner of the text area.
The following contains an example that will add a text string to a canvas.
The blue lines represent the x and y axes, and show through since an alpha value of 0.9 is used.
Text drawn by example code below
void add_text( Papyrus::Canvas& canvas ) { // Create a text object Papyrus::Text::pointer text = Papyrus::Text::create("Text", 40); // Add the text to the canvas canvas.add( text ); // Set the fill color to red, with an alpha value of 0.9 text->set_fill( Cairo::SolidPattern::create_rgba(0.0, 1.0, 0.0, 0.9) ); // To color the lines of a text shape, set the outline pattern text->set_outline( Cairo::SolidPattern::create_rgba(0.0, 0.0, 0.0, 0.9) ); }