diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2016-10-01 17:14:28 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2016-10-01 17:14:28 +0930 |
commit | 4e70815b349309e0a82bc8c52663e030c24a1add (patch) | |
tree | 9eea3d41e5017fb60b6f83d913d627b81aaacbca /src/cairo-default-context.c | |
parent | b207a932a2d3740984319dffd58a0791580597cd (diff) | |
download | cairo-4e70815b349309e0a82bc8c52663e030c24a1add.tar.gz |
Add tag functions to cairo_t and cairo_surface_t
The cairo_tag_begin/cairo_tag_end API is for supporting hyperlinks and
creating tagged PDF files.
The source, ctm, and stroke style are passed to the backend to allow
these parameters to be used to specify hyperlink border attributes.
Diffstat (limited to 'src/cairo-default-context.c')
-rw-r--r-- | src/cairo-default-context.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/cairo-default-context.c b/src/cairo-default-context.c index 1e5067bf1..694eecf78 100644 --- a/src/cairo-default-context.c +++ b/src/cairo-default-context.c @@ -1156,6 +1156,24 @@ _cairo_default_context_copy_page (void *abstract_cr) } static cairo_status_t +_cairo_default_context_tag_begin (void *abstract_cr, + const char *tag_name, const char *attributes) +{ + cairo_default_context_t *cr = abstract_cr; + + return _cairo_gstate_tag_begin (cr->gstate, tag_name, attributes); +} + +static cairo_status_t +_cairo_default_context_tag_end (void *abstract_cr, + const char *tag_name) +{ + cairo_default_context_t *cr = abstract_cr; + + return _cairo_gstate_tag_end (cr->gstate, tag_name); +} + +static cairo_status_t _cairo_default_context_show_page (void *abstract_cr) { cairo_default_context_t *cr = abstract_cr; @@ -1437,6 +1455,9 @@ static const cairo_backend_t _cairo_default_context_backend = { _cairo_default_context_copy_page, _cairo_default_context_show_page, + + _cairo_default_context_tag_begin, + _cairo_default_context_tag_end, }; cairo_status_t |