synfig-core  1.0.3
Macros | Functions
curvegradient.cpp File Reference

Implementation of the "Curve Gradient" layer. More...

#include "curvegradient.h"
#include <synfig/string.h>
#include <synfig/time.h>
#include <synfig/context.h>
#include <synfig/paramdesc.h>
#include <synfig/renddesc.h>
#include <synfig/surface.h>
#include <synfig/value.h>
#include <synfig/valuenode.h>
#include <synfig/cairo_renddesc.h>
#include <ETL/bezier>
#include <ETL/hermite>
#include <ETL/calculus>

Macros

#define FAKE_TANGENT_STEP   0.000001
#define POINT_CHECK(x)   bp=curve(x); thisdist=(bp-p).mag_squared(); if(thisdist<dist) { ret=iter; dist=thisdist; best_bline_dist=total_bline_dist; /* best_bline_len=len; */ best_curve=curve; }

Functions

 SYNFIG_LAYER_INIT (CurveGradient)
 SYNFIG_LAYER_SET_NAME (CurveGradient,"curve_gradient")
 SYNFIG_LAYER_SET_LOCAL_NAME (CurveGradient, N_("Curve Gradient"))
 SYNFIG_LAYER_SET_CATEGORY (CurveGradient, N_("Gradients"))
 SYNFIG_LAYER_SET_VERSION (CurveGradient,"0.0")
 SYNFIG_LAYER_SET_CVS_ID (CurveGradient,"$Id$")
float calculate_distance (const synfig::BLinePoint &a, const synfig::BLinePoint &b)
float calculate_distance (const std::vector< synfig::BLinePoint > &bline, bool bline_loop)
std::vector
< synfig::BLinePoint >
::const_iterator 
find_closest (bool fast, const std::vector< synfig::BLinePoint > &bline, const Point &p, float &t, bool loop=false, float *bline_dist_ret=0)

Detailed Description

Implementation of the "Curve Gradient" layer.

$Id$

=== N O T E S ===========================================================


Macro Definition Documentation

#define FAKE_TANGENT_STEP   0.000001
#define POINT_CHECK (   x)    bp=curve(x); thisdist=(bp-p).mag_squared(); if(thisdist<dist) { ret=iter; dist=thisdist; best_bline_dist=total_bline_dist; /* best_bline_len=len; */ best_curve=curve; }

Function Documentation

SYNFIG_LAYER_INIT ( CurveGradient  )
SYNFIG_LAYER_SET_NAME ( CurveGradient  ,
"curve_gradient"   
)
SYNFIG_LAYER_SET_LOCAL_NAME ( CurveGradient  ,
N_("Curve Gradient")   
)
SYNFIG_LAYER_SET_CATEGORY ( CurveGradient  ,
N_("Gradients")   
)
SYNFIG_LAYER_SET_VERSION ( CurveGradient  ,
"0.0"   
)
SYNFIG_LAYER_SET_CVS_ID ( CurveGradient  ,
"$Id$"   
)
float calculate_distance ( const synfig::BLinePoint a,
const synfig::BLinePoint b 
)
inline
float calculate_distance ( const std::vector< synfig::BLinePoint > &  bline,
bool  bline_loop 
)
inline
std::vector<synfig::BLinePoint>::const_iterator find_closest ( bool  fast,
const std::vector< synfig::BLinePoint > &  bline,
const Point p,
float &  t,
bool  loop = false,
float *  bline_dist_ret = 0 
)
Todo:
is this a redundant call to find_closest()?

References POINT_CHECK.

Referenced by synfig::find_closest_point().