.. include:: headings.inc .. module:: lib.pdfviewer.bezier .. currentmodule:: lib.pdfviewer.bezier .. highlight:: python .. _lib.pdfviewer.bezier: ========================================================================================================================================== |phoenix_title| **bezier** ========================================================================================================================================== |function_summary| Functions Summary ==================================== ================================================================================ ================================================================================ :func:`~lib.pdfviewer.bezier.calculate_bezier` Calculate a bezier curve from 4 control points and return a :func:`~lib.pdfviewer.bezier.compute_points` Input 4 control points as wxRealPoints and convert to vec2d instances. ================================================================================ ================================================================================ | Functions ------------ .. function:: calculate_bezier(p, steps = 30) Calculate a bezier curve from 4 control points and return a list of the resulting points. Depends on the 2d vector class from http://www.pygame.org/wiki/2DVectorClass 2007 Victor Blomqvist Released to the Public Domain The function uses the forward differencing algorithm described at http://www.niksula.cs.hut.fi/~hkankaan/Homepages/bezierfast.html .. function:: compute_points(controlpoints, nsteps=30) Input 4 control points as wxRealPoints and convert to vec2d instances. compute the nsteps points on the resulting curve and return them as a list of wxPoints