コード例 #1
0
 def ellipse(self, x, y, width, height, draw=True, **kwargs):
     '''Draw an ellipse starting from (x,y)'''
     path = self.BezierPath(**kwargs)
     path.ellipse(x, y, width, height, self.ellipsemode)
     if draw:
         path.draw()
     return path
コード例 #2
0
 def oval(self, x, y, width, height, draw=True, **kwargs):
     '''Draw an ellipse starting from (x,y) -  ovals and ellipses are not the same'''
     path = self.BezierPath(**kwargs)
     path.ellipse(x, y, width, height, self.ellipsemode)
     if draw:
         path.draw()
     return path
コード例 #3
0
ファイル: nodebox.py プロジェクト: arvindmeena01/shoebot
 def oval(self, x, y, width, height, draw=True, **kwargs):
     '''Draw an ellipse starting from (x,y) -  ovals and ellipses are not the same'''
     path = self.BezierPath(**kwargs)
     path.ellipse(x, y, width, height)
     if draw:
         path.draw()
     return path
コード例 #4
0
ファイル: nodebox.py プロジェクト: arvindmeena01/shoebot
 def ellipse(self, x, y, width, height, draw=True, **kwargs):
     '''Draw an ellipse starting from (x,y)'''
     path = self.BezierPath(**kwargs)
     path.ellipse(x,y,width,height)
     if draw:
         path.draw()
     return path
コード例 #5
0
    def ellipse(self, x, y, width, height, draw=True, **kwargs):
        """Draw an ellipse.

        :param x: top left x-coordinate
        :param y: top left y-coordinate
        :param width: ellipse width
        :param height: ellipse height
        :param boolean draw: whether to draw the shape on the canvas or not
        :return: BezierPath representing the ellipse
        """

        path = self.BezierPath(**kwargs)
        path.ellipse(x, y, width, height, self.ellipsemode)
        if draw:
            path.draw()
        return path