Author gregorlingl
Recipients
Date 2006-06-30.19:04:56
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1547199

Making two changes will correct the bug:

(a) In RawPen.__init__(): 

    def __init__(self, canvas):
        self._canvas = canvas
        self._items = []
        self._tracing = 1
        self._arrow = 0
        self._delay = 10     # default delay for drawing
        # patch for degrees()
##      self.degrees() # replace by the following two lines
        self._fullcircle = 360.0
        self._invradian = pi/180.0
        self.reset()

(b) in RawPen.degrees() : 

    def degrees(self, fullcircle=360.0):
        """ Set angle measurement units to degrees.

        Example:
        >>> turtle.degrees()
        """
        # patch for degrees(): add next line
        self._angle=self._angle*fullcircle/self._fullcircle
        self._fullcircle = fullcircle
        self._invradian = pi / (fullcircle * 0.5)


Additional Remark: In order that the function degrees()
works identically to the method of same name it should be
written:

def degrees(fullcircle=360.0): _getpen().degrees(fullcircle)
History
Date User Action Args
2007-08-23 14:40:57adminlinkissue1514685 messages
2007-08-23 14:40:57admincreate