Lines Matching refs:w0

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)
118 gdouble w0 = bbox_visual.width(); // will return a value >= 0, as required further down the road
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)) {
157 if ((fabs(w0 - stroke_x) < 1e-6) || w1 == 0) { // We have a vertical line at hand
160 unbudge *= Geom::Translate (-flip_x * 0.5 * (scale_x - 1.0) * w0, 0);
161 unbudge *= Geom::Translate ( flip_x * 0.5 * (w1 - w0), 0); // compensate for the fact that this operation cannot be performed
163 scale_x = w1/w0;
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);
187 // If w1 < 0 then the scale will be wrong if we just assume that scale_x = (w1 - r1)/(w0 - r0);
188 // Therefore we here need the absolute values of w0, w1, h0, h1, and r0, as taken care of earlier
189 scale_x = (w1 - r1)/(w0 - r0);
195 scale_x = (w1 - r0) / (w0 - r0);
202 // scale_x = (w1 - new_stroke_x)/(w0 - stroke_x)
204 gdouble A = h1*(w0 - stroke_x);
205 gdouble B = (h0*stroke_x - w0*stroke_y);
209 g_message("stroke scaling error : %d, %f, %f, %f, %f, %f, %f", preserve, stroke_x, stroke_y, w0, h0, w1, h1);
212 scale_x = (w1 - stroke_x*Sx_div_Sy)/(w0 - stroke_x);
217 scale_x = w1 / w0;
264 // 1) We start with a visual bounding box (w0, h0) which we want to transfer into another visual bounding box (w1, h1)
268 gdouble w0 = bbox_visual.width(); // will return a value >= 0, as required further down the road
278 gdouble r0w = w0 - bbox_geom.width(); // r0w is the average strokewidth of the left and right edges, i.e. 0.5*(r0l + r0r)
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
316 if ((fabs(w0 - r0w) < 1e-6) || w1 == 0) { // We have a vertical line at hand
319 unbudge *= Geom::Translate (-flip_x * 0.5 * (scale_x - 1.0) * w0, 0);
320 unbudge *= Geom::Translate ( flip_x * 0.5 * (w1 - w0), 0); // compensate for the fact that this operation cannot be performed
322 scale_x = w1/w0;
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);
349 // If w1 < 0 then the scale will be wrong if we just assume that scale_x = (w1 - r1)/(w0 - r0);
350 // Therefore we here need the absolute values of w0, w1, h0, h1, and r0, as taken care of earlier
351 scale_x = (w1 - r1w)/(w0 - r0w);
357 scale_x = (w1 - r0w) / (w0 - r0w);
364 // scale_x = (w1 - new_r0w)/(w0 - r0w)
366 gdouble A = h1*(w0 - r0w);
367 gdouble B = (h0*r0w - w0*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);
374 scale_x = (w1 - r0w*Sx_div_Sy)/(w0 - r0w);
379 scale_x = w1 / w0;
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