CMS 3D CMS Logo

Public Member Functions | Public Attributes | Static Public Attributes

svgfig::HLine Class Reference

Inheritance diagram for svgfig::HLine:
svgfig::Line svgfig::Curve

List of all members.

Public Member Functions

def __init__
def __repr__
def Path

Public Attributes

 attr
 y
 y1
 y2

Static Public Attributes

dictionary defaults = {}

Detailed Description

Draws a horizontal line.

HLine(x1, x2, y, attribute=value)

x1, x2                  required        x range
y                       required        y position
attribute=value pairs   keyword list    SVG attributes

Definition at line 2150 of file svgfig.py.


Constructor & Destructor Documentation

def svgfig::HLine::__init__ (   self,
  x1,
  x2,
  y,
  attr 
)

Definition at line 2164 of file svgfig.py.

02165                                        :
02166     self.y = y
02167     self.attr = dict(self.defaults)
02168     self.attr.update(attr)
02169     Line.__init__(self, x1, y, x2, y, **self.attr)


Member Function Documentation

def svgfig::HLine::__repr__ (   self)

Reimplemented from svgfig::Line.

Definition at line 2161 of file svgfig.py.

02162                     :
02163     return "<HLine (%g, %g) at y=%s %s>" % (self.x1, self.x2, self.y, self.attr)

def svgfig::HLine::Path (   self,
  trans = None,
  local = False 
)
Apply the transformation "trans" and return a Path object in
global coordinates.  If local=True, return a Path in local coordinates
(which must be transformed again).

Reimplemented from svgfig::Line.

Definition at line 2170 of file svgfig.py.

02171                                          :
02172     """Apply the transformation "trans" and return a Path object in
02173     global coordinates.  If local=True, return a Path in local coordinates
02174     (which must be transformed again)."""
02175     self.y1 = self.y
02176     self.y2 = self.y
02177     return Line.Path(self, trans, local)


Member Data Documentation

Reimplemented from svgfig::Line.

Definition at line 2164 of file svgfig.py.

dictionary svgfig::HLine::defaults = {} [static]

Reimplemented from svgfig::Line.

Definition at line 2159 of file svgfig.py.

Definition at line 2164 of file svgfig.py.

Definition at line 2172 of file svgfig.py.

Reimplemented from svgfig::Line.

Definition at line 2172 of file svgfig.py.