Lines Matching refs:r0h

279     gdouble r0h = h0 - bbox_geom.height(); // r0h is the average strokewidth of the top and bottom edges, i.e. 0.5*(r0t + r0b)
281 if ((r0h == Geom::infinity()) || (fabs(r0h) < 1e-6)) r0h = 0;
292 if ((fabs(w0 - r0w) < 1e-6) && (fabs(h0 - r0h) < 1e-6)) {
298 if (r0w < 0 || r0h < 0) {
309 gdouble stroke_ratio_h = fabs(r0h) < 1e-6 ? 1 : (bbox_geom[Geom::Y].min() - bbox_visual[Geom::Y].min())/r0h;
321 } else if ((fabs(h0 - r0h) < 1e-6) || h1 == 0) { // We have a horizontal line at hand
328 /* Initial area of the geometric bounding box: A0 = (w0-r0w)*(h0-r0h)
331 * r1h^2 = A1/A0 * r0h^2
332 * These can be re-expressed as : r1w/r0w = r1h/r0h
333 * and : r1w*r1w*(w0 - r0w)*(h0 - r0h) = r0w*r0w*(w1 - r1w)*(h1 - r1h)
337 gdouble A = w0*h0 - r0h*w0 - r0w*h0;
338 gdouble B = r0h*w1 + r0w*h1;
342 g_message("variable stroke scaling error : %d, %d, %f, %f, %f, %f, %f, %f", transform_stroke, preserve, r0w, r0h, w0, h0, w1, h1);
348 r1h = r0h*det;
352 scale_y = (h1 - r1h)/(h0 - r0h);
354 unbudge *= Geom::Translate (-flip_x * stroke_ratio_w * (r0w * scale_x - r1w), -flip_y * stroke_ratio_h * (r0h * scale_y - r1h));
358 scale_y = (h1 - r0h) / (h0 - r0h);
359 unbudge *= Geom::Translate (-flip_x * stroke_ratio_w * r0w * (scale_x - 1), -flip_y * stroke_ratio_h * r0h * (scale_y - 1));
361 // geometric mean of r0w and r0h will be preserved
363 // new_r0h = r0h*sqrt(scale_y/scale_x)
365 // scale_y = (h1 - new_r0h)/(h0 - r0h)
367 gdouble B = (h0*r0w - w0*r0h);
368 gdouble C = -w1*(h0 - r0h);
371 g_message("variable stroke scaling error : %d, %d, %f, %f, %f, %f, %f, %f", transform_stroke, preserve, r0w, r0h, w0, h0, w1, h1);
375 scale_y = (h1 - r0h/Sx_div_Sy)/(h0 - r0h);
376 unbudge *= Geom::Translate (-flip_x * stroke_ratio_w * r0w * scale_x * (1.0 - sqrt(1.0/scale_x/scale_y)), -flip_y * stroke_ratio_h * r0h * scale_y * (1.0 - sqrt(1.0/scale_x/scale_y)));