Re: Recording surfaces fail to replay onto SVG surfaces

Adrian Johnson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 12/10/17 21:01, Antonio Ospite wrote:
> On Thu, 5 Oct 2017 20:54:53 +1030
> ajohnson at redneon.com (Adrian Johnson) wrote:
> 
>> I've pushed a fix for painting unbounded recordings to the SVG surface.
>>
> 
> Hi
> 
> I too experienced a similar problem recently.
> 
> The changes in 5a9dba9929d9 seem to fix the original test case of
> replaying to an SVG surface, but only for the first time: I noticed that
> replaying a second time still fails, producing an empty SVG.
> 
> BTW, these seems to be regressions as 1.14.10 works fine in both cases.
> 
> I also noticed that the generated files look a little different when
> using the current master: groups and links are used for the replayed
> surfaces, while with 1.14.10 the replayed elements are drawn ungrouped,
> I don't know if the regression is related to this change.

In recent versions, unbounded recording surfaces are emitted as a group
instead of replaying the drawing operations. This allows the group to be
emitted once and used multiple times.

The problem is the SVG backend marks a surface as emitted by setting a
user_data key on the surface. This prevents the surface from being
reused on another SVG file.

I've pushed a fix that uses a hash table to tracked emitted surfaces the
same way as the PDF backend. The fix also includes the support for
CAIRO_MIME_TYPE_UNIQUE_ID that is in the PDF backend.
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.