コード例 #1
0
ファイル: drawing.py プロジェクト: omgimanerd/graphics
    def draw_bezier_curve(self, p1, i1, i2, p2, color=Color.BLACK(), step=30):
        """
        Draws a bezier curve onto the internal raster after applying the
        current TranformationMatrix on the stack.

        Parameters:
        p1: list, the first endpoint of the bezier curve
        i1: list, the first influence point of the bezier curve
        i2: list, the second influence point of the bezier curve
        p2: list, the second endpoint of the bezier curve
        color: Color (optional), the color of the curve
        step: int (optional), the number of steps to use for drawing the curve
        """
        self.draw_edgematrix(Generator.get_bezier_curve_edgematrix(p1, i1, i2, p2, step=step), color)
コード例 #2
0
    def draw_bezier_curve(self, p1, i1, i2, p2, color=Color.BLACK(), step=30):
        """
        Draws a bezier curve onto the internal raster after applying the
        current TranformationMatrix on the stack.

        Parameters:
        p1: list, the first endpoint of the bezier curve
        i1: list, the first influence point of the bezier curve
        i2: list, the second influence point of the bezier curve
        p2: list, the second endpoint of the bezier curve
        color: Color (optional), the color of the curve
        step: int (optional), the number of steps to use for drawing the curve
        """
        self.draw_edgematrix(
            Generator.get_bezier_curve_edgematrix(p1, i1, i2, p2, step=step),
            color)