Show
Ignore:
Timestamp:
02/12/07 22:54:46 (2 years ago)
Author:
fdb
Message:

insert_point now works correctly, ValueLadder? no longer crashes on Unicode text, keydowns work in fullscreen mode (so you can play avoider fullscreen)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • nodebox/trunk/src/DrawingPrimitives.py

    r82 r83  
    7070 
    7171    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) 
    7373         
    7474    def __eq__(self, other): 
     
    308308    def __repr__(self): 
    309309        if self.cmd == MOVETO: 
    310             return "PathElement(MOVETO, ((%s, %s),))" % (self.x, self.y) 
     310            return "PathElement(MOVETO, ((%.3f, %.3f),))" % (self.x, self.y) 
    311311        elif self.cmd == LINETO: 
    312             return "PathElement(LINETO, ((%s, %s),))" % (self.x, self.y) 
     312            return "PathElement(LINETO, ((%.3f, %.3f),))" % (self.x, self.y) 
    313313        elif self.cmd == CURVETO: 
    314             return "PathElement(CURVETO, ((%s, %s), (%s, %s), (%s, %s))" % \ 
     314            return "PathElement(CURVETO, ((%.3f, %.3f), (%.3f, %s), (%.3f, %.3f))" % \ 
    315315                (self.ctrl1.x, self.ctrl1.y, self.ctrl2.x, self.ctrl2.y, self.x, self.y) 
    316316        elif self.cmd == CLOSE: 
     
    391391 
    392392    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, 
    394394                self.green, self.blue, self.alpha) 
    395395 
     
    570570 
    571571    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__,) 
    573573                 + tuple(self)) 
    574574