Summary: | cairo_write_func_t isn't called when a call to cairo_show_page/cairo_copy_page is done | ||
---|---|---|---|
Product: | cairo | Reporter: | Carlos Eduardo Rodrigues DiĆ³genes <cerdiogenes> |
Component: | svg backend | Assignee: | Emmanuel Pacaud <emmanuel.pacaud> |
Status: | RESOLVED MOVED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | 1.5.13 | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Carlos Eduardo Rodrigues DiĆ³genes
2008-03-10 14:22:03 UTC
I guess it should be possible, by having a defs element before each page. (In reply to comment #1) > I guess it should be possible, by having a defs element before each page. I ran into the same issue. Can you please explain your solution and how to implement it? cairo_status_t writeSvg(void *closure, const unsigned char *data, unsigned int length) { ... } ... void main() { cairo_surface_t *surface=0; cairo_t *cr=0; surface = cairo_svg_surface_create_for_stream(writeSvg, &truncated, 390, 60); cr = cairo_create(surface); cairo_set_source_rgb(cr, 0, 0, 0); cairo_select_font_face(cr, "Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size(cr, 40.0); cairo_move_to(cr, 10.0, 50.0); cairo_show_text(cr, "Hello World."); cairo_show_page(cr); // writeSvg not invoked here! cairo_move_to(cr, 10.0, 50.0); cairo_show_text(cr, "Knowledge is Power."); cairo_surface_destroy(surface); cairo_destroy(cr); // writeSvg invoked here! ... } -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/250. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.