Lines Matching defs:w1
109 // 1) We start with a visual bounding box (w0, h0) which we want to transfer into another visual bounding box (w1, h1)
122 gdouble w1 = x1 - x0; // can have any sign
127 int flip_x = (w1 > 0) ? 1 : -1;
130 // w1 and h1 will be negative when mirroring, but if so then e.g. w1-r0 won't make sense
132 w1 = fabs(w1);
139 Geom::Affine direct = Geom::Scale(flip_x * w1 / w0, flip_y* h1 / h0); // Scaling of the visual bounding box
157 if ((fabs(w0 - stroke_x) < 1e-6) || w1 == 0) { // We have a vertical line at hand
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;
170 * Desired area of the geometric bounding box: A1 = (w1-r1)*(h1-r1)
174 * r1^2 * (w0-r0) * (h0-r0) = r0^2 * (w1-r1) * (h1-r1)
179 gdouble B = -(w1 + h1) * r0*r0;
180 gdouble C = w1 * h1 * r0*r0;
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)
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);
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)
272 gdouble w1 = x1 - x0; // can have any sign
283 int flip_x = (w1 > 0) ? 1 : -1;
286 // w1 and h1 will be negative when mirroring, but if so then e.g. w1-r0 won't make sense
288 w1 = fabs(w1);
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
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;
329 * Desired area of the geometric bounding box: A1 = (w1-r1w)*(h1-r1h)
333 * and : r1w*r1w*(w0 - r0w)*(h0 - r0h) = r0w*r0w*(w1 - r1w)*(h1 - r1h)
338 gdouble B = r0h*w1 + r0w*h1;
339 gdouble C = -w1*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);
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)
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);
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