Bug 35738 - Recording replay clipping output (1.11.2 & latest git)
Summary: Recording replay clipping output (1.11.2 & latest git)
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.10.3
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 05:08 UTC by Ross Alexander
Modified: 2018-08-25 13:37 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Contains source C program and outputs. (3.79 KB, application/x-bzip2)
2011-03-28 05:08 UTC, Ross Alexander
Details
test programs in C and python (1.26 KB, application/gzip)
2015-04-24 20:48 UTC, Antonio Ospite
Details
test programs in C and python (1.26 KB, application/gzip)
2015-04-24 21:17 UTC, Antonio Ospite
Details

Description Ross Alexander 2011-03-28 05:08:25 UTC
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.
Comment 1 Ross Alexander 2011-03-29 06:54:12 UTC
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.
Comment 2 Antonio Ospite 2015-04-24 20:48:00 UTC
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.
Comment 3 Antonio Ospite 2015-04-24 21:17:18 UTC
Created attachment 115316 [details]
test programs in C and python

Attaching the right archive, sorry.
Comment 4 GitLab Migration User 2018-08-25 13:37:26 UTC
-- 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.