diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2015-04-30 17:23:38 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2015-04-30 17:23:38 -0400 |
commit | d4e0fb667815ad80bff60491a2125321ee88d1b7 (patch) | |
tree | 66135cf849c359170a40039d8e6f3162c64c2a84 /pango/pangofc-private.h | |
parent | c089b1f7b0e3006b88c1a76784dcb4d8a2da7547 (diff) | |
download | pango-d4e0fb667815ad80bff60491a2125321ee88d1b7.tar.gz |
Bug 602257 - Make pango_matrix_get_font_scale_factors() public
Diffstat (limited to 'pango/pangofc-private.h')
-rw-r--r-- | pango/pangofc-private.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/pango/pangofc-private.h b/pango/pangofc-private.h index 5c993969..e0ffdc41 100644 --- a/pango/pangofc-private.h +++ b/pango/pangofc-private.h @@ -109,48 +109,6 @@ _pango_fc_shape (PangoFont *font, const char *paragraph_text, unsigned int paragraph_length); -/* To be made public at some point */ - -#include <math.h> - -static G_GNUC_UNUSED void -pango_matrix_get_font_scale_factors (const PangoMatrix *matrix, - double *xscale, double *yscale) -{ -/* - * Based on cairo-matrix.c:_cairo_matrix_compute_scale_factors() - * - * Copyright 2005, Keith Packard - */ - double major = 0, minor = 0; - - if (matrix) { - double det = matrix->xx * matrix->yy - matrix->yx * matrix->xy; - - if (det) - { - double x = matrix->xx; - double y = matrix->yx; - - major = sqrt (x*x + y*y); - - /* - * ignore mirroring - */ - if (det < 0) - det = - det; - - if (major) - minor = det / major; - } - } - - if (xscale) - *xscale = major; - if (yscale) - *yscale = minor; -} - G_END_DECLS #endif /* __PANGOFC_PRIVATE_H__ */ |