goocanvas.Text — A text item.
class goocanvas.Text(goocanvas.ItemSimple): |
+-- gobject.GObject +-- goocanvas.ItemSimple +-- goocanvas.Text
|
goocanvas.Text implements goocanvas.Item
goocanvas.Text(properties=None)
properties : | A comma separated list of properties. |
Returns : | A new goocanvas.Text |
Creates a new canvas text item.
Here's an example showing how to create a text item with the bottom right of the text box placed at (500,500):
text = goocanvas.Text(text="Hello, World!", x=500, y=500 width=200, anchor=gtk.ANCHOR_SE, fill_color="blue")
def get_natural_extents()
Returns : | a 2-tuple containing two 4-tuples representing the ink and logical rectangles used to store the extents of glyph as drawn. |
Gets the natural extents of the text, in the text item's coordinate space. The final extents of the text may be different, if the text item is placed in a layout container such as goocanvas.Table.