Changeset 83 for nodebox/trunk/src/DrawingPrimitives.py
- Timestamp:
- 02/12/07 22:54:46 (2 years ago)
- Files:
-
- 1 modified
-
nodebox/trunk/src/DrawingPrimitives.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nodebox/trunk/src/DrawingPrimitives.py
r82 r83 70 70 71 71 def __repr__(self): 72 return "Point(x=% s, y=%s)" % (self.x, self.y)72 return "Point(x=%.3f, y=%.3f)" % (self.x, self.y) 73 73 74 74 def __eq__(self, other): … … 308 308 def __repr__(self): 309 309 if self.cmd == MOVETO: 310 return "PathElement(MOVETO, ((% s, %s),))" % (self.x, self.y)310 return "PathElement(MOVETO, ((%.3f, %.3f),))" % (self.x, self.y) 311 311 elif self.cmd == LINETO: 312 return "PathElement(LINETO, ((% s, %s),))" % (self.x, self.y)312 return "PathElement(LINETO, ((%.3f, %.3f),))" % (self.x, self.y) 313 313 elif self.cmd == CURVETO: 314 return "PathElement(CURVETO, ((% s, %s), (%s, %s), (%s, %s))" % \314 return "PathElement(CURVETO, ((%.3f, %.3f), (%.3f, %s), (%.3f, %.3f))" % \ 315 315 (self.ctrl1.x, self.ctrl1.y, self.ctrl2.x, self.ctrl2.y, self.x, self.y) 316 316 elif self.cmd == CLOSE: … … 391 391 392 392 def __repr__(self): 393 return "%s(% s, %s, %s, %s)" % (self.__class__.__name__, self.red,393 return "%s(%.3f, %.3f, %.3f, %.3f)" % (self.__class__.__name__, self.red, 394 394 self.green, self.blue, self.alpha) 395 395 … … 570 570 571 571 def __repr__(self): 572 return "<%s [% s %s %s %s %s %s]>" % ((self.__class__.__name__,)572 return "<%s [%.3f %.3f %.3f %.3f %.3f %.3f]>" % ((self.__class__.__name__,) 573 573 + tuple(self)) 574 574
