{
std::vector<synfig::BLinePoint>::const_iterator iter,next,ret;
std::vector<synfig::BLinePoint>::const_iterator end(bline.end());
{
std::vector<synfig::BLinePoint>::const_iterator iter,next,ret;
std::vector<synfig::BLinePoint>::const_iterator end(bline.end());
{
std::vector<synfig::BLinePoint>::const_iterator iter,next,ret;
std::vector<synfig::BLinePoint>::const_iterator end(bline.end());
{
std::vector<synfig::BLinePoint>::const_iterator iter,next,ret;
std::vector<synfig::BLinePoint>::const_iterator end(bline.end());
next=bline.begin();
float best_bline_dist(0);
float best_bline_len(0);
float total_bline_dist(0);
etl::hermite<Vector> best_curve;
next=bline.begin();
float best_bline_dist(0);
float best_bline_len(0);
float total_bline_dist(0);
etl::hermite<Vector> best_curve;
/*
const float t(curve.find_closest(p,6,0.01,0.99));
/*
const float t(curve.find_closest(p,6,0.01,0.99));
*bline_dist_ret=best_bline_dist+best_curve.find_distance(0,best_curve.find_closest(p));
// *bline_dist_ret=best_bline_dist+best_curve.find_closest(p)*best_bline_len;
}
*bline_dist_ret=best_bline_dist+best_curve.find_distance(0,best_curve.find_closest(p));
// *bline_dist_ret=best_bline_dist+best_curve.find_closest(p)*best_bline_len;
}
bline.push_back(BLinePoint());
bline.push_back(BLinePoint());
bline.push_back(BLinePoint());
bline.push_back(BLinePoint());
bline.push_back(BLinePoint());
bline.push_back(BLinePoint());
- bline[0].set_vertex(Point(0,1));
- bline[1].set_vertex(Point(0,-1));
+ bline[0].set_vertex(Point(0,1));
+ bline[1].set_vertex(Point(0,-1));
- bline[0].set_tangent(bline[1].get_vertex()-bline[2].get_vertex()*0.5f);
- bline[1].set_tangent(bline[2].get_vertex()-bline[0].get_vertex()*0.5f);
- bline[2].set_tangent(bline[0].get_vertex()-bline[1].get_vertex()*0.5f);
- bline[0].set_width(1.0f);
- bline[1].set_width(1.0f);
- bline[2].set_width(1.0f);
+ bline[0].set_tangent(bline[1].get_vertex()-bline[2].get_vertex()*0.5f);
+ bline[1].set_tangent(bline[2].get_vertex()-bline[0].get_vertex()*0.5f);
+ bline[2].set_tangent(bline[0].get_vertex()-bline[1].get_vertex()*0.5f);
+ bline[0].set_width(1.0f);
+ bline[1].set_width(1.0f);
+ bline[2].set_width(1.0f);
// Figure out the BLinePoints we will be using,
// Taking into account looping.
if(perpendicular)
// Figure out the BLinePoints we will be using,
// Taking into account looping.
if(perpendicular)
/*if(quality==0)search_iterations=8;
else if(quality<=2)search_iterations=10;
else if(quality<=4)search_iterations=8;
/*if(quality==0)search_iterations=8;
else if(quality<=2)search_iterations=10;
else if(quality<=4)search_iterations=8;
// Figure out the closest point on the curve
const float t(curve.find_closest(point,search_iterations));
// Figure out the closest point on the curve
const float t(curve.find_closest(point,search_iterations));
Point tl(renddesc.get_tl());
const int w(surface->get_w());
const int h(surface->get_h());
Point tl(renddesc.get_tl());
const int w(surface->get_w());
const int h(surface->get_h());
if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT)
{
for(y=0,pos[1]=tl[1];y<h;y++,pen.inc_y(),pen.dec_x(x),pos[1]+=ph)
if(get_amount()==1.0 && get_blend_method()==Color::BLEND_STRAIGHT)
{
for(y=0,pos[1]=tl[1];y<h;y++,pen.inc_y(),pen.dec_x(x),pos[1]+=ph)