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

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

#include "curvewarp.h"
#include <synfig/context.h>
#include <synfig/paramdesc.h>
#include <synfig/surface.h>
#include <synfig/valuenode.h>
#include <ETL/calculus>
#include <synfig/cairo_renddesc.h>

Macros

#define FAKE_TANGENT_STEP   0.000001
#define TOO_THIN   0.01
#define POINT_CHECK(x)   bp=curve(x); thisdist=(bp-p).mag_squared(); if(thisdist<dist) { extreme = (first&&x<0.01); ret=iter; best_len = total_len; dist=thisdist; best_curve=curve; last=true; best_pos=x;}
#define UPDATE_DIST
#define MAXPIX   10000
#define UPDATE_DIST
#define MAXPIX   10000

Functions

 SYNFIG_LAYER_INIT (CurveWarp)
 SYNFIG_LAYER_SET_NAME (CurveWarp,"curve_warp")
 SYNFIG_LAYER_SET_LOCAL_NAME (CurveWarp, N_("Curve Warp"))
 SYNFIG_LAYER_SET_CATEGORY (CurveWarp, N_("Distortions"))
 SYNFIG_LAYER_SET_VERSION (CurveWarp,"0.0")
 SYNFIG_LAYER_SET_CVS_ID (CurveWarp,"$Id$")
float calculate_distance (const std::vector< synfig::BLinePoint > &bline)
std::vector
< synfig::BLinePoint >
::const_iterator 
find_closest_to_bline (bool fast, const std::vector< synfig::BLinePoint > &bline, const Point &p, float &t, float &len, bool &extreme)

Detailed Description

Implementation of the "Curve Warp" layer.

$Id$

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


Macro Definition Documentation

#define FAKE_TANGENT_STEP   0.000001

Referenced by CurveWarp::transform().

#define TOO_THIN   0.01

Referenced by CurveWarp::transform().

#define POINT_CHECK (   x)    bp=curve(x); thisdist=(bp-p).mag_squared(); if(thisdist<dist) { extreme = (first&&x<0.01); ret=iter; best_len = total_len; dist=thisdist; best_curve=curve; last=true; best_pos=x;}
#define UPDATE_DIST
Value:
if (dist < min_dist) min_dist = dist; \
if (dist > max_dist) max_dist = dist; \
if (along < min_along) min_along = along; \
if (along > max_along) max_along = along

Referenced by CurveWarp::accelerated_cairorender(), and CurveWarp::accelerated_render().

#define MAXPIX   10000
#define UPDATE_DIST
Value:
if (dist < min_dist) min_dist = dist; \
if (dist > max_dist) max_dist = dist; \
if (along < min_along) min_along = along; \
if (along > max_along) max_along = along
#define MAXPIX   10000

Function Documentation

SYNFIG_LAYER_INIT ( CurveWarp  )
SYNFIG_LAYER_SET_NAME ( CurveWarp  ,
"curve_warp"   
)
SYNFIG_LAYER_SET_LOCAL_NAME ( CurveWarp  ,
N_("Curve Warp")   
)
SYNFIG_LAYER_SET_CATEGORY ( CurveWarp  ,
N_("Distortions")   
)
SYNFIG_LAYER_SET_VERSION ( CurveWarp  ,
"0.0"   
)
SYNFIG_LAYER_SET_CVS_ID ( CurveWarp  ,
"$Id$"   
)
float calculate_distance ( const std::vector< synfig::BLinePoint > &  bline)
inline
std::vector<synfig::BLinePoint>::const_iterator find_closest_to_bline ( bool  fast,
const std::vector< synfig::BLinePoint > &  bline,
const Point p,
float &  t,
float &  len,
bool &  extreme 
)

References POINT_CHECK.

Referenced by CurveWarp::transform().