diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2008-09-18 00:26:07 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2008-09-18 00:26:07 -0400 |
commit | 1fe7088a113f8a9cb40d436f10af4967662cd02a (patch) | |
tree | c4174320064ac9c9e3b77ce5ae6db93106f98c29 /src/cairo-user-font.c | |
parent | a8cd426a4c79a7165b312f550ecc6a87b61303a3 (diff) |
[show_text_glyphs] Replace the bool backward with cairo_text_cluster_flags
Chris rightfully complained that having a boolean function argument is
new in cairo_show_text_glyphs, and indeed avoiding them has been one
of the API design criteria for cairo. Trying to come up with alternatives,
Owen suggested using a flag type which nicely solves the problem AND
future-proofs such a complex API.
Please welcome _flags_t APIs to cairo.h
Diffstat (limited to 'src/cairo-user-font.c')
-rw-r--r-- | src/cairo-user-font.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/cairo-user-font.c b/src/cairo-user-font.c index f49943b6..0f46c58e 100644 --- a/src/cairo-user-font.c +++ b/src/cairo-user-font.c @@ -271,16 +271,16 @@ _cairo_user_ucs4_to_index (void *abstract_font, } static cairo_int_status_t -_cairo_user_text_to_glyphs (void *abstract_font, - double x, - double y, - const char *utf8, - int utf8_len, - cairo_glyph_t **glyphs, - int *num_glyphs, - cairo_text_cluster_t **clusters, - int *num_clusters, - cairo_bool_t *backward) +_cairo_user_text_to_glyphs (void *abstract_font, + double x, + double y, + const char *utf8, + int utf8_len, + cairo_glyph_t **glyphs, + int *num_glyphs, + cairo_text_cluster_t **clusters, + int *num_clusters, + cairo_text_cluster_flags_t *cluster_flags) { cairo_int_status_t status = CAIRO_INT_STATUS_UNSUPPORTED; @@ -295,8 +295,7 @@ _cairo_user_text_to_glyphs (void *abstract_font, status = face->scaled_font_methods.text_to_glyphs (&scaled_font->base, utf8, utf8_len, glyphs, num_glyphs, - clusters, num_clusters, - backward); + clusters, num_clusters, cluster_flags); if (status != CAIRO_STATUS_SUCCESS) return status; |