CMS 3D CMS Logo

Public Member Functions | Public Attributes | Static Public Attributes

svgfig::TextGlobal Class Reference

List of all members.

Public Member Functions

def __init__
def __repr__
def SVG

Public Attributes

 attr
 d
 x
 y

Static Public Attributes

dictionary defaults = {"stroke":"none", "fill":"black", "font-size":5}

Detailed Description

Draws at text string at a specified point in global coordinates.

x, y                   required      location of the point in global coordinates
d                      required      text/Unicode string
attribute=value pairs  keyword list  SVG attributes 

Definition at line 1862 of file svgfig.py.


Constructor & Destructor Documentation

def svgfig::TextGlobal::__init__ (   self,
  x,
  y,
  d,
  attr 
)

Definition at line 1874 of file svgfig.py.

01875                                      :
01876     self.x = x
01877     self.y = y
01878     self.d = str(d)
01879     self.attr = dict(self.defaults)
01880     self.attr.update(attr)


Member Function Documentation

def svgfig::TextGlobal::__repr__ (   self)

Definition at line 1871 of file svgfig.py.

01872                     :
01873     return "<TextGlobal %s at (%s, %s) %s>" % (repr(self.d), str(self.x), str(self.y), self.attr)

def svgfig::TextGlobal::SVG (   self,
  trans = None 
)
Apply the transformation "trans" and return an SVG object.

Definition at line 1881 of file svgfig.py.

01882                            :
01883     """Apply the transformation "trans" and return an SVG object."""
01884     return SVG("text", self.d, x=self.x, y=self.y, **self.attr)


Member Data Documentation

Definition at line 1874 of file svgfig.py.

Definition at line 1874 of file svgfig.py.

dictionary svgfig::TextGlobal::defaults = {"stroke":"none", "fill":"black", "font-size":5} [static]

Definition at line 1869 of file svgfig.py.

Definition at line 1874 of file svgfig.py.

Definition at line 1874 of file svgfig.py.