synfig-core
1.0.3
|
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) |
Implementation of the "Curve Gradient" layer.
$Id$
=== N O T E S ===========================================================
#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; } |
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$" | |||
) |
|
inline |
|
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 |
||
) |
References POINT_CHECK.
Referenced by synfig::find_closest_point().