Package esys :: Package pyvisi :: Module text :: Class Text2D
[hide private]
[frames] | no frames]

Class Text2D

actor.Actor2D --+
                |
               Text2D

Class that defines a 2D text actor. A two-dimensional text is used to annotate the rendered object (i.e. inserting titles, authors and labels).

Instance Methods [hide private]
 
__init__(self, scene, text, viewport=0)
Initialise the 2D text actor.
 
__setInput(self)
Set the input for the 2D text.
 
__setupText2D(self, scene)
Setup the 2D text.
 
boldOn(self)
Bold the 2D text.
 
setColor(self, color)
Set the color of the 2D text.
 
setFontSize(self, size)
Set the 2D text size.
 
setFontToArial(self)
Set the 2D text font type to Arial.
 
setFontToCourier(self)
Set the 2D text front type to Courier.
 
setFontToTimes(self)
Set the 2D text font type to Times New Roman.
 
shadowOn(self)
Apply shadow onto the 2D text to ease visibility.

Inherited from actor.Actor2D: setPosition

Inherited from actor.Actor2D (private): _getActor2D, _setupActor2D

Method Details [hide private]

__init__(self, scene, text, viewport=0)
(Constructor)

 

Initialise the 2D text actor.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on
  • text (String) - 2D text to be displayed
  • viewport (Viewport constant) - Viewport in which objects are to be rendered on
Overrides: actor.Actor2D.__init__

__setupText2D(self, scene)

 

Setup the 2D text.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on

setColor(self, color)

 

Set the color of the 2D text.

Parameters:
  • color (Color constant) - 2D text color

setFontSize(self, size)

 

Set the 2D text size.

Parameters:
  • size (Number) - Size of the 2D text