summaryrefslogtreecommitdiff
path: root/pango/pango-types.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-01-04 19:35:56 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-01-04 19:35:56 +0000
commit143def0d70b166251c5971eabb61c901343502c9 (patch)
treec1402594c509e908efcc7225710af3e53a66fd21 /pango/pango-types.h
parentcbf5f1e8a747ce6b9d6a0b03a7febd6c6c55b0ca (diff)
downloadpango-143def0d70b166251c5971eabb61c901343502c9.tar.gz
Part of Bug 332266 – gdk_draw_layout fails for coordinates >= 2^21
2007-01-04 Behdad Esfahbod <behdad@gnome.org> Part of Bug 332266 – gdk_draw_layout fails for coordinates >= 2^21 * pango/pango-types.h: * pango/pango-matrix.c: New public API: pango_matrix_transform_distance() pango_matrix_transform_point() pango_matrix_transform_rectangle() pango_matrix_transform_pixel_rectangle() * pango/pango-utils.h: * pango/pango-utils.c: New public API: pango_units_from_double() pango_units_to_double() pango_extents_to_pixels() * pango/pango-layout.c (pango_layout_get_pixel_extents), (pango_layout_line_get_pixel_extents): Use pango_extents_to_pixels(). * pango/pangocairo-fcfont.c: (pango_cairo_fc_font_glyph_extents_cache_init), (compute_glyph_extents): Use pango_units_from_double(). * examples/renderdemo.c (do_output): Use pango_matrix_transform_pixel_rectangle(); * pango/pango.def: * docs/pango-sections.txt: * docs/tmpl/glyphs.sgml: Update. svn path=/trunk/; revision=2126
Diffstat (limited to 'pango/pango-types.h')
-rw-r--r--pango/pango-types.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/pango/pango-types.h b/pango/pango-types.h
index 221bc64b..75c31278 100644
--- a/pango/pango-types.h
+++ b/pango/pango-types.h
@@ -56,11 +56,8 @@ typedef guint32 PangoGlyph;
* integers and floating point.
*/
-/* Hint line position and thickness.
- */
-void pango_quantize_line_geometry (int *thickness,
- int *position);
-
+int pango_units_from_double (double d) G_GNUC_CONST;
+double pango_units_to_double (int i) G_GNUC_CONST;
/* Dummy typedef - internally it's a 'const char *' */
@@ -99,7 +96,8 @@ struct _PangoRectangle
#define PANGO_LBEARING(rect) ((rect).x)
#define PANGO_RBEARING(rect) ((rect).x + (rect).width)
-
+void pango_extents_to_pixels (PangoRectangle *ink_rect,
+ PangoRectangle *logical_rect);
/**
* PangoDirection:
@@ -139,7 +137,7 @@ typedef enum {
PANGO_DIRECTION_NEUTRAL
} PangoDirection;
-PangoDirection pango_unichar_direction (gunichar ch);
+PangoDirection pango_unichar_direction (gunichar ch) G_GNUC_CONST;
PangoDirection pango_find_base_dir (const gchar *text,
gint length);
@@ -177,7 +175,7 @@ typedef enum {
PANGO_GRAVITY_AUTO
} PangoGravity;
-double pango_gravity_to_rotation (PangoGravity gravity);
+double pango_gravity_to_rotation (PangoGravity gravity) G_GNUC_CONST;
@@ -248,6 +246,16 @@ void pango_matrix_rotate (PangoMatrix *matrix,
double degrees);
void pango_matrix_concat (PangoMatrix *matrix,
const PangoMatrix *new_matrix);
+void pango_matrix_transform_point (const PangoMatrix *matrix,
+ double *x,
+ double *y);
+void pango_matrix_transform_distance (const PangoMatrix *matrix,
+ double *dx,
+ double *dy);
+void pango_matrix_transform_rectangle (const PangoMatrix *matrix,
+ PangoRectangle *rect);
+void pango_matrix_transform_pixel_rectangle (const PangoMatrix *matrix,
+ PangoRectangle *rect);
double pango_matrix_get_font_scale_factor (const PangoMatrix *matrix);
PangoGravity pango_matrix_to_gravity (const PangoMatrix *matrix);