diff options
Diffstat (limited to 'pango/pangocairo-render.c')
-rw-r--r-- | pango/pangocairo-render.c | 84 |
1 files changed, 10 insertions, 74 deletions
diff --git a/pango/pangocairo-render.c b/pango/pangocairo-render.c index 21f32c58..361fc563 100644 --- a/pango/pangocairo-render.c +++ b/pango/pangocairo-render.c @@ -973,9 +973,9 @@ _pango_cairo_do_glyph_item (cairo_t *cr, } static void -_pango_cairo_do_layout_line (cairo_t *cr, - PangoLayoutLine *line, - gboolean do_path) +_pango_cairo_do_layout_line (cairo_t *cr, + PangoLayoutLine *line, + gboolean do_path) { PangoCairoRenderer *crenderer = acquire_renderer (); PangoRenderer *renderer = (PangoRenderer *) crenderer; @@ -992,25 +992,6 @@ _pango_cairo_do_layout_line (cairo_t *cr, } static void -_pango_cairo_do_line (cairo_t *cr, - PangoLine *line, - gboolean do_path) -{ - PangoCairoRenderer *crenderer = acquire_renderer (); - PangoRenderer *renderer = (PangoRenderer *) crenderer; - - crenderer->cr = cr; - crenderer->do_path = do_path; - save_current_point (crenderer); - - pango_renderer_draw_line (renderer, line, 0, 0); - - restore_current_point (crenderer); - - release_renderer (crenderer); -} - -static void _pango_cairo_do_lines (cairo_t *cr, PangoLines *lines, gboolean do_path) @@ -1041,7 +1022,7 @@ _pango_cairo_do_layout (cairo_t *cr, crenderer->do_path = do_path; save_current_point (crenderer); - pango_renderer_draw_layout (renderer, layout, 0, 0); + pango_renderer_draw_lines (renderer, pango_layout_get_lines (layout), 0, 0); restore_current_point (crenderer); @@ -1133,7 +1114,7 @@ pango_cairo_show_glyph_item (cairo_t *cr, } /** - * pango_cairo_show_layout_line: + * pango_cairo_show_line: * @cr: a Cairo context * @line: a `PangoLayoutLine` * @@ -1141,12 +1122,10 @@ pango_cairo_show_glyph_item (cairo_t *cr, * * The origin of the glyphs (the left edge of the line) will * be drawn at the current point of the cairo context. - * - * Since: 1.10 */ void -pango_cairo_show_layout_line (cairo_t *cr, - PangoLayoutLine *line) +pango_cairo_show_layout_line (cairo_t *cr, + PangoLayoutLine *line) { g_return_if_fail (cr != NULL); g_return_if_fail (line != NULL); @@ -1155,26 +1134,6 @@ pango_cairo_show_layout_line (cairo_t *cr, } /** - * pango_cairo_show_line: - * @cr: a Cairo context - * @line: a `PangoLine` - * - * Draws a `PangoLine` in the specified cairo context. - * - * The origin of the glyphs (the left edge of the line) will - * be drawn at the current point of the cairo context. - */ -void -pango_cairo_show_line (cairo_t *cr, - PangoLine *line) -{ - g_return_if_fail (cr != NULL); - g_return_if_fail (line != NULL); - - _pango_cairo_do_line (cr, line, FALSE); -} - -/** * pango_cairo_show_lines: * @cr: a Cairo context * @lines: a `PangoLines` object @@ -1282,41 +1241,18 @@ pango_cairo_glyph_string_path (cairo_t *cr, * * The origin of the glyphs (the left edge of the line) will be * at the current point of the cairo context. - * - * Since: 1.10 */ void -pango_cairo_layout_line_path (cairo_t *cr, - PangoLayoutLine *line) +pango_cairo_layout_line_path (cairo_t *cr, + PangoLayoutLine *line) { g_return_if_fail (cr != NULL); - g_return_if_fail (line != NULL); + g_return_if_fail (PANGO_IS_LAYOUT_LINE (line)); _pango_cairo_do_layout_line (cr, line, TRUE); } /** - * pango_cairo_line_path: - * @cr: a Cairo context - * @line: a `PangoLayoutLine` - * - * Adds the text in `PangoLine` to the current path in the - * specified cairo context. - * - * The origin of the glyphs (the left edge of the line) will be - * at the current point of the cairo context. - */ -void -pango_cairo_line_path (cairo_t *cr, - PangoLine *line) -{ - g_return_if_fail (cr != NULL); - g_return_if_fail (PANGO_IS_LINE (line)); - - _pango_cairo_do_line (cr, line, TRUE); -} - -/** * pango_cairo_layout_path: * @cr: a Cairo context * @layout: a Pango layout |