diff options
author | Owen Taylor <otaylor@redhat.com> | 2005-05-07 18:05:17 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2005-05-07 18:05:17 +0000 |
commit | e174de1f25a84cae71518bfc5ac0f82e4cda964e (patch) | |
tree | 9d28624c016a505aaac889bda493b25f08cda47f /pango | |
parent | cdc77f57773bfb4639f15b77a14736658a3d9926 (diff) | |
download | pango-e174de1f25a84cae71518bfc5ac0f82e4cda964e.tar.gz |
Update for Cairo API changes.
2005-05-07 Owen Taylor <otaylor@redhat.com>
* pango/pangocairo-fontmap.c pango/pangocairo-render.c
examples/cairosimple.c pango/pangocairo-fcfont.c
examples/cairoview.c: Update for Cairo API changes.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pangocairo-fcfont.c | 4 | ||||
-rw-r--r-- | pango/pangocairo-fontmap.c | 12 | ||||
-rw-r--r-- | pango/pangocairo-render.c | 20 |
3 files changed, 18 insertions, 18 deletions
diff --git a/pango/pangocairo-fcfont.c b/pango/pangocairo-fcfont.c index 7b2d9243..f14e8e9a 100644 --- a/pango/pangocairo-fcfont.c +++ b/pango/pangocairo-fcfont.c @@ -121,7 +121,7 @@ pango_cairo_fc_font_install (PangoCairoFont *font, cairo_set_font_face (cr, pango_cairo_fc_font_get_font_face (font)); - cairo_transform_font (cr, &cffont->font_matrix); + cairo_set_font_matrix (cr, &cffont->font_matrix); } static void @@ -132,7 +132,6 @@ cairo_font_iface_init (PangoCairoFontIface *iface) G_DEFINE_TYPE_WITH_CODE (PangoCairoFcFont, pango_cairo_fc_font, PANGO_TYPE_FC_FONT, { G_IMPLEMENT_INTERFACE (PANGO_TYPE_CAIRO_FONT, cairo_font_iface_init) }); - static void pango_cairo_fc_font_finalize (GObject *object) { @@ -152,7 +151,6 @@ pango_cairo_fc_font_get_glyph_extents (PangoFont *font, PangoRectangle *ink_rect, PangoRectangle *logical_rect) { - PangoCairoFcFont *cffont = PANGO_CAIRO_FC_FONT (font); cairo_scaled_font_t *scaled_font; cairo_text_extents_t extents; cairo_glyph_t cairo_glyph; diff --git a/pango/pangocairo-fontmap.c b/pango/pangocairo-fontmap.c index f448e3d9..f8cd2ab8 100644 --- a/pango/pangocairo-fontmap.c +++ b/pango/pangocairo-fontmap.c @@ -215,11 +215,13 @@ pango_cairo_update_context (cairo_t *cr, g_return_if_fail (cr != NULL); g_return_if_fail (PANGO_IS_CONTEXT (context)); - cairo_current_matrix (cr, &cairo_matrix); - cairo_matrix_get_affine (&cairo_matrix, - &pango_matrix.xx, &pango_matrix.yx, - &pango_matrix.xy, &pango_matrix.yy, - &pango_matrix.x0, &pango_matrix.y0); + cairo_get_matrix (cr, &cairo_matrix); + pango_matrix.xx = cairo_matrix.xx; + pango_matrix.yx = cairo_matrix.yx; + pango_matrix.xy = cairo_matrix.xy; + pango_matrix.yy = cairo_matrix.yy; + pango_matrix.x0 = cairo_matrix.x0; + pango_matrix.y0 = cairo_matrix.y0; pango_context_set_matrix (context, &pango_matrix); } diff --git a/pango/pangocairo-render.c b/pango/pangocairo-render.c index 00c1bdc5..9a1048ce 100644 --- a/pango/pangocairo-render.c +++ b/pango/pangocairo-render.c @@ -50,10 +50,10 @@ set_color (PangoCairoRenderer *crenderer, PangoColor *color = pango_renderer_get_color (PANGO_RENDERER (crenderer), part); if (color) - cairo_set_rgb_color (crenderer->cr, - color->red / 65535., - color->green / 65535., - color->blue / 65535.); + cairo_set_source_rgb (crenderer->cr, + color->red / 65535., + color->green / 65535., + color->blue / 65535.); } static void @@ -285,7 +285,7 @@ pango_cairo_show_glyph_string (cairo_t *cr, crenderer->cr = cr; crenderer->do_path = FALSE; - cairo_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); + cairo_get_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); pango_renderer_draw_glyphs (renderer, font, glyphs, 0, 0); @@ -328,7 +328,7 @@ pango_cairo_show_layout_line (cairo_t *cr, crenderer->cr = cr; crenderer->do_path = FALSE; - cairo_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); + cairo_get_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); pango_renderer_draw_layout_line (renderer, line, 0, 0); @@ -371,7 +371,7 @@ pango_cairo_show_layout (cairo_t *cr, crenderer->cr = cr; crenderer->do_path = FALSE; - cairo_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); + cairo_get_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); pango_renderer_draw_layout (renderer, layout, 0, 0); @@ -413,7 +413,7 @@ pango_cairo_glyph_string_path (cairo_t *cr, crenderer->cr = cr; crenderer->do_path = TRUE; - cairo_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); + cairo_get_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); pango_renderer_draw_glyphs (renderer, font, glyphs, 0, 0); @@ -455,7 +455,7 @@ pango_cairo_layout_line_path (cairo_t *cr, crenderer->cr = cr; crenderer->do_path = TRUE; - cairo_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); + cairo_get_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); pango_renderer_draw_layout_line (renderer, line, 0, 0); @@ -497,7 +497,7 @@ pango_cairo_layout_path (cairo_t *cr, crenderer->cr = cr; crenderer->do_path = TRUE; - cairo_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); + cairo_get_current_point (cr, &crenderer->x_offset, &crenderer->y_offset); pango_renderer_draw_layout (renderer, layout, 0, 0); |