phoenix_title wx.lib.floatcanvas.FCObjects.Text

Draws a text object

The size is fixed, and does not scale with the drawing.

The hit-test is done on the entire text extent


class_hierarchy Class Hierarchy

Inheritance diagram for class Text:

super_classes Known Superclasses

wx.lib.floatcanvas.FCObjects.DrawObject, wx.lib.floatcanvas.FCObjects.TextObjectMixin


method_summary Methods Summary

__init__

Default class constructor.


api Class API

class Text(TextObjectMixin, DrawObject)

Draws a text object

The size is fixed, and does not scale with the drawing.

The hit-test is done on the entire text extent


Methods

__init__(self, String, xy, Size = 14, Color = "Black", BackgroundColor = None, Family = wx.FONTFAMILY_MODERN, Style = wx.FONTSTYLE_NORMAL, Weight = wx.FONTWEIGHT_NORMAL, Underlined = False, Position = 'tl', InForeground = False, Font = None)

Default class constructor.

Parameters:
  • string (string) – the text to draw

  • XY – the (x, y) coordinate of the corner of the text, or a 2-tuple, or a (2,) NumPy array

  • Size – the font size

  • Color – see SetColor

  • BackgroundColor – see SetColor

  • Family (FontFamily) – a valid wx.FontFamily

  • Style (FontStyle) – a valid wx.FontStyle

  • Weight (FontWeight) – a valid wx.FontWeight

  • Underlined (boolean) – underline the text

  • Position (string) – a two character string indicating where in relation to the coordinates the box should be oriented

  • InForeground (boolean) – should object be in foreground

  • Font (wx.Font) –

    alternatively you can define wx.Font and the above will be ignored.

    1st character

    Meaning

    t

    top

    c

    center

    b

    bottom

    2nd character

    Meaning

    l

    left

    c

    center

    r

    right

  • Font – a valid wx.Font

  • InForeground – should object be in foreground