Public Member Functions | |
def | __init__ |
def | __repr__ |
def | Path |
def | SVG |
Public Attributes | |
attr | |
b | |
f | |
high | |
loop | |
low | |
Static Public Attributes | |
dictionary | defaults = {} |
Draws an ellipse from a semimajor vector (ax,ay) and a semiminor length (b). Ellipse(x, y, ax, ay, b, attribute=value) x, y required the center of the ellipse/circle ax, ay required a vector indicating the length and direction of the semimajor axis b required the length of the semiminor axis. If equal to sqrt(ax2 + ay2), the ellipse is a circle attribute=value pairs keyword list SVG attributes (If sqrt(ax**2 + ay**2) is less than b, then (ax,ay) is actually the semiminor axis.)
def svgfig::Ellipse::__init__ | ( | self, | |
x, | |||
y, | |||
ax, | |||
ay, | |||
b, | |||
attr | |||
) |
def svgfig::Ellipse::__repr__ | ( | self | ) |
Reimplemented from svgfig::Curve.
def svgfig::Ellipse::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::Curve.
Definition at line 2267 of file svgfig.py.
02268 : 02269 """Apply the transformation "trans" and return a Path object in 02270 global coordinates. If local=True, return a Path in local coordinates 02271 (which must be transformed again).""" 02272 angle = math.atan2(self.ay, self.ax) + math.pi/2. 02273 bx = self.b * math.cos(angle) 02274 by = self.b * math.sin(angle) 02275 02276 self.f = lambda t: (self.x + self.ax*math.cos(t) + bx*math.sin(t), self.y + self.ay*math.cos(t) + by*math.sin(t)) 02277 self.low = -math.pi 02278 self.high = math.pi 02279 self.loop = True 02280 return Curve.Path(self, trans, local)
def svgfig::Ellipse::SVG | ( | self, | |
trans = None |
|||
) |
Apply the transformation "trans" and return an SVG object.
Reimplemented from svgfig::Curve.
Reimplemented from svgfig::Curve.
dictionary svgfig::Ellipse::defaults = {} [static] |
Reimplemented from svgfig::Curve.
Reimplemented from svgfig::Curve.
Reimplemented from svgfig::Curve.
Reimplemented from svgfig::Curve.
Reimplemented from svgfig::Curve.