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

        Parameters:
        p1: list, the first point of the hermite curve
        r1: list, the rate of change at p1
        p2: list, the second point of the hermite curve
        r2: list, the rate of change at p2
        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_hermite_curve_edgematrix(p1, r1, p2, r2, step=step), color)
コード例 #2
0
    def draw_hermite_curve(self, p1, r1, p2, r2, color=Color.BLACK(), step=30):
        """
        Draws a hermite curve onto the internal raster after applying the
        current TransformationMatrix on the stack.

        Parameters:
        p1: list, the first point of the hermite curve
        r1: list, the rate of change at p1
        p2: list, the second point of the hermite curve
        r2: list, the rate of change at p2
        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_hermite_curve_edgematrix(p1, r1, p2, r2, step=step),
            color)