This allows for more sharing of resource objects. It also avoids some
confusion in trying to set independent resources at a global and a
per-page level, (which doesn't work since the inheritance only works
for an entire resources object---it can only be overriden in its
entirety, not for subsets of the resources).
The only expected errors that would lead to this fallback are serious
problems such as out of memory. There's no reason to go to heroic
efforts to draw as much as possible in face of an error like that.
Prefer simpler code instead.
Since we are only ever displaying a single glyph at a time we don't
care about the width values passed to setcachedevice at all---we only
care about the bounding box.
That's what the code was trying to do before, but the arguments were
misaligned and we were instead passing bounding-box values for the
widths and hard-coding half of the bounding-box values as 0.
The return of status from this callback was misleading. The function
actually calling the callback was also a hash table callback function,
which itself is void---so any status value returned was being lost.
Instead, we now stash any errors that occur during the fallback into
surface->status.
Eliminate the named structure cairo_pdf_stream_t. This structure was
being dynamically allocated, passed around, and leaked when only an ID
was actually needed to be passed around.
Similarly, many other uses of PDF resources were passing bare unsigned
int types rather than the safer and more legible cairo_pdf_resource_t.
This is an adaptation of Keith ps-type3 branch for SVG backend.
Main differences with ps stuff are font cache is a property of
document, and there's no need of subfonts.
We keep the clip in surface-backend coordinates always, so it needs
fixing whenever we change the target surface out in the gstate. The
only place this happens is in push_group, so fix it as part of
gstate_redirect().
This patch adds the following API calls:
cairo_push_group
cairo_push_group_with_content
cairo_pop_group
cairo_pop_group_to_source
cairo_get_group_target
These methods support implementing layers on top of a cairo context,
allowing for drawing with transparency and temporary buffering.
cairo_get_group_target allows an app to get access to the actual surface
created by the last push_group call, in case itneeds to perform native
drawing to it.
This is a mega-patch that has the advantage that the entire test suite
passes both immediately before and immediately after this commit.
The disadvantage of the mega-patch is that it does not reflect the
development history of the device-offset branch, (with its various
fumblings and flailings). To capture that history, we will next merge
in that branch.
This commit adds the following new functions to the cairo-ps API:
cairo_ps_surface_dsc_comment
cairo_ps_surface_dsc_begin_setup
cairo_ps_surface_dsc_begin_page_setup
Many thanks are due to Michael Sweet who provided invaluble guidance
during the design of this API.
It is hoped that with this API in place, basically all printer control
that is likely to be desired to be performed with cairo PostScript
output is now possible.
This commit augments the ps-features test to exercise the new API.