Beispiel #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
Beispiel #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
Beispiel #3
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)
     if draw:
         path.draw()
     return path
Beispiel #4
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)
     if draw:
         path.draw()
     return path
Beispiel #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