diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-06-30 22:11:48 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-06-30 22:11:48 -0400 |
commit | c29029ce436709fc3f3ce651a92eebcee11f3203 (patch) | |
tree | c6d5d09312984a07305b1dbbadc1f32cf77a10fe /src/test-paginated-surface.c | |
parent | 17a5f10f5342ae6b946ad7491f6656a43df66aa3 (diff) | |
download | cairo-c29029ce436709fc3f3ce651a92eebcee11f3203.tar.gz |
Remove _cairo_surface_show_glyphs() in favor of _cairo_surface_show_text_glyphs()
Diffstat (limited to 'src/test-paginated-surface.c')
-rw-r--r-- | src/test-paginated-surface.c | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/src/test-paginated-surface.c b/src/test-paginated-surface.c index 6b85a1323..48c730824 100644 --- a/src/test-paginated-surface.c +++ b/src/test-paginated-surface.c @@ -232,14 +232,26 @@ _test_paginated_surface_fill (void *abstract_surface, tolerance, antialias); } +static cairo_bool_t +_test_paginated_surface_has_show_text_glyphs (void *abstract_surface) +{ + test_paginated_surface_t *surface = abstract_surface; + + return _cairo_surface_has_show_text_glyphs (surface->target); +} + static cairo_int_status_t -_test_paginated_surface_show_glyphs (void *abstract_surface, - cairo_operator_t op, - cairo_pattern_t *source, - cairo_glyph_t *glyphs, - int num_glyphs, - cairo_scaled_font_t *scaled_font, - int *remaining_glyphs) +_test_paginated_surface_show_text_glyphs (void *abstract_surface, + cairo_operator_t op, + cairo_pattern_t *source, + const char *utf8, + int utf8_len, + cairo_glyph_t *glyphs, + int num_glyphs, + const cairo_text_cluster_t *clusters, + int num_clusters, + cairo_bool_t backward, + cairo_scaled_font_t *scaled_font) { test_paginated_surface_t *surface = abstract_surface; cairo_int_status_t status; @@ -248,8 +260,8 @@ _test_paginated_surface_show_glyphs (void *abstract_surface, return CAIRO_STATUS_SUCCESS; /* Since this is a "wrapping" surface, we're calling back into - * _cairo_surface_show_glyphs from within a call to the same. - * Since _cairo_surface_show_glyphs acquires a mutex, we release + * _cairo_surface_show_text_glyphs from within a call to the same. + * Since _cairo_surface_show_text_glyphs acquires a mutex, we release * and re-acquire the mutex around this nested call. * * Yes, this is ugly, but we consider it pragmatic as compared to @@ -258,13 +270,18 @@ _test_paginated_surface_show_glyphs (void *abstract_surface, * lead to bugs). */ CAIRO_MUTEX_UNLOCK (scaled_font->mutex); - status = _cairo_surface_show_glyphs (surface->target, op, source, - glyphs, num_glyphs, scaled_font); + status = _cairo_surface_show_text_glyphs (surface->target, op, source, + utf8, utf8_len, + glyphs, num_glyphs, + clusters, num_clusters, + backward, + scaled_font); CAIRO_MUTEX_LOCK (scaled_font->mutex); return status; } + static void _test_paginated_surface_set_paginated_mode (void *abstract_surface, cairo_paginated_mode_t mode) @@ -309,8 +326,16 @@ static const cairo_surface_backend_t test_paginated_surface_backend = { _test_paginated_surface_mask, _test_paginated_surface_stroke, _test_paginated_surface_fill, - _test_paginated_surface_show_glyphs, - NULL /* snapshot */ + NULL, /* show_glyphs */ + + NULL, /* snapshot */ + NULL, /* is_similar */ + NULL, /* reset */ + NULL, /* fill_stroke */ + NULL, /* create_solid_pattern_surface */ + + _test_paginated_surface_has_show_text_glyphs, + _test_paginated_surface_show_text_glyphs }; static const cairo_paginated_surface_backend_t test_paginated_surface_paginated_backend = { |