third_party/cairo/src/cairo-pdf-operators.c
static void
_cairo_matrix_factor_out_scale (cairo_matrix_t *m, double *scale)
{
    double s;

    s = fabs (m->xx);
    if (fabs (m->xy) > s)
	s = fabs (m->xy);
    if (fabs (m->yx) > s)
	s = fabs (m->yx);
    if (fabs (m->yy) > s)
	s = fabs (m->yy);
    *scale = s;
    s = 1.0/s;
    cairo_matrix_scale (m, s, s);
}
/* Scale the matrix so the largest absolute value of the non
 * translation components is 1.0. Return the scale required to restore
 * the matrix to the original values.
 *
 * eg the matrix  [ 100  0  0  50   20   10  ]
 *
 * is rescaled to [  1   0  0  0.5  0.2  0.1 ]
 * and the scale returned is 100
 */
Scale the matrix so the largest absolute value of the non
translation components is 1.0. Return the scale required to restore
the matrix to the original values.




Scale the matrix so the largest absolute value of the non translation components is 1 . 0 . Return the scale required to restore the matrix to the original values .
static void
_cairo_matrix_factor_out_scale (cairo_matrix_t *m, double *scale)
{
    double s;
    s = fabs (m->xx);
    if (fabs (m->xy) > s)
	s = fabs (m->xy);
    if (fabs (m->yx) > s)
	s = fabs (m->yx);
    if (fabs (m->yy) > s)
	s = fabs (m->yy);
    *scale = s;
    s = 1.0/s;
    cairo_matrix_scale (m, s, s);
}
static void _cairo_matrix_factor_out_scale ( cairo_matrix_t * m , double * scale ) { double s ; s = fabs ( m -> xx ) ; if ( fabs ( m -> xy ) > s ) s = fabs ( m -> xy ) ; if ( fabs ( m -> yx ) > s ) s = fabs ( m -> yx ) ; if ( fabs ( m -> yy ) > s ) s = fabs ( m -> yy ) ; * scale = s ; s = 1.0 / s ; cairo_matrix_scale ( m , s , s ) ; }
Scale the matrix so the largest absolute value of the non
 translation components is 1.0.
Scale the matrix so the largest absolute value of the non translation components is 1 . 0 .