Lines Matching defs:res

120 static double DistanceToCubic(Geom::Point const &start, PathDescrCubicTo res, Geom::Point &pt)
123 Geom::Point const ep = pt - res.p;
130 Geom::Point seg = res.p - start;
136 seg = start - res.p;
179 PathDescrCubicTo res(Geom::Point(0, 0), Geom::Point(0, 0), Geom::Point(0, 0));
196 res, worstP) );
212 AttemptSimplify(off + curP, M, treshhold, res, worstP); // ca passe forcement
221 CubicTo(endToPt, res.start, res.end);
250 bool Path::FitCubic(Geom::Point const &start, PathDescrCubicTo &res,
253 Geom::Point const end = res.p;
266 res.start[0]=res.start[1]=0.0;
267 res.end[0]=res.end[1]=0.0;
314 res.start = 3.0 * (cp1 - start);
315 res.end = 3.0 * (end - cp2 );
321 bool Path::ExtendFit(int off, int N, fitting_tables &data, double treshhold, PathDescrCubicTo &res, int &worstP)
389 res.p[0] = data.Xk[data.nbPt - 1];
390 res.p[1] = data.Yk[data.nbPt - 1];
391 res.start[0] = res.start[1] = 0;
392 res.end[0] = res.end[1] = 0;
410 double nle = DistanceToCubic(start, res, nPt);
428 return AttemptSimplify(data, treshhold, res, worstP);
434 bool Path::AttemptSimplify (fitting_tables &data,double treshhold, PathDescrCubicTo & res,int &worstP)
455 res.start = cp1 - start;
456 res.end = end - cp1;
461 if ( FitCubic(start, res, data.Xk, data.Yk, data.Qk, data.tk, data.nbPt) ) {
462 cp1 = start + res.start / 3;
463 cp2 = end - res.end / 3;
472 double nle = DistanceToCubic(start, res, nPt);
609 if ( FitCubic(start, res, data.Xk, data.Yk, data.Qk, data.tk, data.nbPt) == false) {
611 res.start = 3.0 * (cp1 - start);
612 res.end = 3.0 * (end - cp2 );
726 res.start = 3.0 * (cp1 - start);
727 res.end = 3.0 * (end - cp2 );
737 bool Path::AttemptSimplify(int off, int N, double treshhold, PathDescrCubicTo &res,int &worstP)
762 res.p = end;
763 res.start[0] = res.start[1] = 0;
764 res.end[0] = res.end[1] = 0;
767 res.start = cp1 - start;
768 res.end = end - cp1;
806 res.start[0] = res.start[1] = 0;
807 res.end[0] = res.end[1] = 0;
816 double nle = DistanceToCubic(start, res, nPt);
846 res.p = end;
847 if ( FitCubic(start, res, Xk, Yk, Qk, tk, N) ) {
848 cp1 = start + res.start / 3;
849 cp2 = end + res.end / 3;
852 res.start[0] = res.start[1] = 0;
853 res.end[0] = res.end[1] = 0;
859 double nle = DistanceToCubic(start, res, nPt);
971 res.start = 3.0 * (cp1 - start);
972 res.end = -3.0 * (cp2 - end);
973 res.p = end;
990 if ( FitCubic(start,res,Xk,Yk,Qk,tk,N) ) {
993 res.start = 3.0 * (cp1 - start);
994 res.end = -3.0 * (cp2 - end);
1099 res.start = 3.0 * (cp1 - start);
1100 res.end = -3.0 * (cp2 - end);
1224 PathDescrCubicTo res(Geom::Point(0, 0), Geom::Point(0, 0), Geom::Point(0, 0));
1226 if (AttemptSimplify(lastA, nextA - lastA + 1, (containsForced) ? 0.05 * tresh : tresh, res, worstP)) {
1230 pending_cubic = res;
1252 PathDescrCubicTo res(Geom::Point(0, 0), Geom::Point(0, 0), Geom::Point(0, 0));
1254 if (AttemptSimplify(lastA, nextA - lastA + 1, 0.05 * tresh, res, worstP)) {
1275 PathDescrCubicTo res(Geom::Point(0, 0), Geom::Point(0, 0), Geom::Point(0, 0));
1277 if (AttemptSimplify(lastA, nextA - lastA + 1, tresh, res, worstP)) {
1281 pending_cubic = res;