Bug 3752 - cairo_stroke should go through backend_surface->fill_path
Summary: cairo_stroke should go through backend_surface->fill_path
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 0.9.3
Hardware: x86 (IA32) All
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-12 05:05 UTC by Carl Worth
Modified: 2006-04-19 00:16 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Carl Worth 2005-07-12 05:05:51 UTC
Currently, cairo_fill goes directly to the backend fill_path function
which means that a filled cairo path ends up as a filled PDF path (for
instance). However, cairo_stroke tessellates to trapezoids and goes
through the backend composite_trapezoids functions. This means that a
stroked path ends up as a bunch of filled trapezoids in the PDF output
(for instance).

This results in larger file sizes than we really want, and it also causes
less scalable results, (since the curves are flattened to within the
cairo tolerance given its knowledge of the output DPI).

We've discussed reasons not to make a stroke_path backend function, (such
as buggy stroke implementations in many/most?/all? PostScript implementations).
It might make sense to try to characterize such bugs and use a backend
stroke_path when we trust it, but that would be another project.

For now, what I would like is for cairo_stroke to generate the outline of
the stroke and then use backend_surface->fill_path on that. This should help
with file size quite a bit. The simplest implementation won't solve the
scaling problem, but I don't think it would be too hard to fix the stroking
algorithm to actually generate a stroke outline with curves rather than an
entirely flattened outline.
Comment 1 Carl Worth 2005-08-22 17:15:27 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Comment 2 Carl Worth 2006-04-19 17:16:35 UTC
We've now fixed the more general issue by adding a backend stroke function,
(which the PDF backend is now using to good effect).


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.