Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

Namespaces | Defines | Typedefs | Functions | Variables

bezier-utils.cpp File Reference

#include <2geom/bezier-utils.h>
#include <2geom/isnan.h>
#include <assert.h>
Include dependency graph for bezier-utils.cpp:

Go to the source code of this file.

Namespaces

namespace  Geom
 

Various geometrical calculations.


Defines

#define __SP_BEZIER_UTILS_C__
#define B0(u)   ( ( 1.0 - u ) * ( 1.0 - u ) * ( 1.0 - u ) )
#define B1(u)   ( 3 * u * ( 1.0 - u ) * ( 1.0 - u ) )
#define B2(u)   ( 3 * u * u * ( 1.0 - u ) )
#define B3(u)   ( u * u * u )
#define BEZIER_ASSERT(b)   do { } while(0)
#define DOUBLE_ASSERT(x)   do { } while(0)
#define noBEZIER_DEBUG
#define SP_HUGE   1e5

Typedefs

typedef Point Geom::BezierCurve []

Functions

int Geom::bezier_fit_cubic (Point *bezier, Point const *data, int len, double error)
int Geom::bezier_fit_cubic_full (Point bezier[], int split_points[], Point const data[], int const len, Point const &tHat1, Point const &tHat2, double const error, unsigned const max_beziers)
int Geom::bezier_fit_cubic_r (Point bezier[], Point const data[], int const len, double const error, unsigned const max_beziers)
Point Geom::bezier_pt (unsigned const degree, Point const V[], double const t)
static void Geom::chord_length_parameterize (Point const d[], double u[], unsigned len)
static double Geom::compute_hook (Point const &a, Point const &b, double const u, BezierCurve const bezCurve, double const tolerance)
static double Geom::compute_max_error_ratio (Point const d[], double const u[], unsigned len, BezierCurve const bezCurve, double tolerance, unsigned *splitPoint)
static unsigned Geom::copy_without_nans_or_adjacent_duplicates (Point const src[], unsigned src_len, Point dest[])
static Point Geom::darray_center_tangent (Point const d[], unsigned center, unsigned length)
Point Geom::darray_left_tangent (Point const d[], unsigned const len)
Point Geom::darray_left_tangent (Point const d[], unsigned const len, double const tolerance_sq)
static Point Geom::darray_right_tangent (Point const d[], unsigned const len)
Point Geom::darray_right_tangent (Point const d[], unsigned const len, double const tolerance_sq)
static void Geom::estimate_bi (Point b[4], unsigned ei, Point const data[], double const u[], unsigned len)
static void Geom::estimate_lengths (Point bezier[], Point const data[], double const u[], unsigned len, Point const &tHat1, Point const &tHat2)
static void Geom::generate_bezier (Point b[], Point const d[], double const u[], unsigned len, Point const &tHat1, Point const &tHat2, double tolerance_sq)
static double Geom::lensq (Point const p)
static double Geom::NewtonRaphsonRootFind (BezierCurve const Q, Point const &P, double u)
static void Geom::reparameterize (Point const d[], unsigned len, double u[], BezierCurve const bezCurve)

Variables

static Point const Geom::unconstrained_tangent (0, 0)

Detailed Description

Bezier interpolation for inkscape drawing code.

Definition in file bezier-utils.cpp.


Generated by  Doxygen 1.6.0   Back to index