Lines Matching refs:h0
109 // 1) We start with a visual bounding box (w0, h0) which we want to transfer into another visual bounding box (w1, h1)
112 // -> The width and height of the geometric bounding box will therefore be (w0 - 2*0.5*r0) and (h0 - 2*0.5*r0)
119 gdouble h0 = bbox_visual.height();
134 // w0 and h0 will always be positive due to the definition of the width() and height() methods.
139 Geom::Affine direct = Geom::Scale(flip_x * w1 / w0, flip_y* h1 / h0); // Scaling of the visual bounding box
149 if ((fabs(w0 - stroke_x) < 1e-6) && (fabs(h0 - stroke_y) < 1e-6)) {
158 scale_y = h1/h0;
162 } else if ((fabs(h0 - stroke_y) < 1e-6) || h1 == 0) { // We have a horizontal line at hand
165 unbudge *= Geom::Translate (0, -flip_y * 0.5 * (scale_y - 1.0) * h0);
166 unbudge *= Geom::Translate (0, flip_y * 0.5 * (h1 - h0)); // compensate for the fact that this operation cannot be performed
169 /* Initial area of the geometric bounding box: A0 = (w0-r0)*(h0-r0)
174 * r1^2 * (w0-r0) * (h0-r0) = r0^2 * (w1-r1) * (h1-r1)
178 gdouble A = -w0*h0 + r0*(w0 + h0);
182 g_message("stroke scaling error : %d, %f, %f, %f, %f, %f", preserve, r0, w0, h0, w1, h1);
188 // Therefore we here need the absolute values of w0, w1, h0, h1, and r0, as taken care of earlier
190 scale_y = (h1 - r1)/(h0 - r0);
196 scale_y = (h1 - r0) / (h0 - r0);
203 // scale_y = (h1 - new_stroke_y)/(h0 - stroke_y)
205 gdouble B = (h0*stroke_x - w0*stroke_y);
206 gdouble C = -w1*(h0 - stroke_y);
209 g_message("stroke scaling error : %d, %f, %f, %f, %f, %f, %f", preserve, stroke_x, stroke_y, w0, h0, w1, h1);
213 scale_y = (h1 - stroke_y/Sx_div_Sy)/(h0 - stroke_y);
218 scale_y = h1 / h0;
264 // 1) We start with a visual bounding box (w0, h0) which we want to transfer into another visual bounding box (w1, h1)
269 gdouble h0 = bbox_visual.height();
279 gdouble r0h = h0 - bbox_geom.height(); // r0h is the average strokewidth of the top and bottom edges, i.e. 0.5*(r0t + r0b)
290 // w0 and h0 will always be positive due to the definition of the width() and height() methods.
292 if ((fabs(w0 - r0w) < 1e-6) && (fabs(h0 - r0h) < 1e-6)) {
299 Geom::Affine direct = Geom::Scale(flip_x * w1 / w0, flip_y* h1 / h0); // Scaling of the visual bounding box
317 scale_y = h1/h0;
321 } else if ((fabs(h0 - r0h) < 1e-6) || h1 == 0) { // We have a horizontal line at hand
324 unbudge *= Geom::Translate (0, -flip_y * 0.5 * (scale_y - 1.0) * h0);
325 unbudge *= Geom::Translate (0, flip_y * 0.5 * (h1 - h0)); // compensate for the fact that this operation cannot be performed
328 /* Initial area of the geometric bounding box: A0 = (w0-r0w)*(h0-r0h)
333 * and : r1w*r1w*(w0 - r0w)*(h0 - r0h) = r0w*r0w*(w1 - r1w)*(h1 - r1h)
337 gdouble A = w0*h0 - r0h*w0 - r0w*h0;
342 g_message("variable stroke scaling error : %d, %d, %f, %f, %f, %f, %f, %f", transform_stroke, preserve, r0w, r0h, w0, h0, w1, h1);
350 // Therefore we here need the absolute values of w0, w1, h0, h1, and r0, as taken care of earlier
352 scale_y = (h1 - r1h)/(h0 - r0h);
358 scale_y = (h1 - r0h) / (h0 - r0h);
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);
380 scale_y = h1 / h0;
406 // scale stroke by: sqrt (((w1-r0)/(w0-r0))*((h1-r0)/(h0-r0))) (for visual bboxes, see get_scale_transform_for_stroke)
407 // equals scaling by: sqrt ((w1/w0)*(h1/h0)) for geometrical bboxes