Summary: | Recording replay clipping output (1.11.2 & latest git) | ||
---|---|---|---|
Product: | cairo | Reporter: | Ross Alexander <ross.alexander> |
Component: | general | Assignee: | Carl Worth <cworth> |
Status: | RESOLVED MOVED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | ao2, loic.grobol |
Version: | 1.10.3 | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Contains source C program and outputs.
test programs in C and python test programs in C and python |
Having considered this a bit more I decided the problem I wasn't fully understanding the surface / pattern interface. So rather than using a recording surface I used an image surface. I presume an recording surface is designed to emulate an image surface? The results made sense (assuming RGB24 image surfaces are black by default) so there is a good chance my thinking was the bug, not cairo. I'll post a question on the list to double check my thinking. Created attachment 115315 [details]
test programs in C and python
Hi,
I think I experience this too, with the latest git code from 2015-04-24.
I would describe it this way: replaying a recording surface gives different results on different backends, in particular when not replaying at the origin of the target surface.
I am attaching a simplified example, I would expect that the result would look the same (modulo the units) in both the png and the svg, but the result in the svg file is unexpected: from C I get an empty image, from python I get the image but with a zero-sized clipPath which makes it invisible.
Created attachment 115316 [details]
test programs in C and python
Attaching the right archive, sorry.
-- 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/104. |
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.
Created attachment 44932 [details] Contains source C program and outputs. I create a recording surface that has an initial translate (tx, ty) then draws a rectangle. When I play this back with cairo_set_source_surface(recording, -tx, -ty) & cairo_paint() the box is drawn at the original but it cropped to (width - tx, height - ty). This seems to be the case for PDF, PS & xlib surfaces. I have written a C program to reproduce this (uses gtk+-3.0 for xlib surface but I can write a simple xlib interface if necessary. I have added an xml and svg output for one of the replays but I'm getting very odd output in the svg.