Bug 6948 - Pen is not being transformed by cm operator
Summary: Pen is not being transformed by cm operator
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: cairo backend (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Jeff Muizelaar
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-17 08:12 UTC by Carl Worth
Modified: 2006-07-18 17:25 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Test case showing buggy rendering (1.32 KB, application/octet-stream)
2006-05-17 08:19 UTC, Carl Worth
Details
use cairo's affine transformation support instead of ignoring it (9.81 KB, patch)
2006-05-17 09:51 UTC, Jeff Muizelaar
Details | Splinter Review
new patch that fixes dashing problems (13.73 KB, patch)
2006-05-28 08:56 UTC, Jeff Muizelaar
Details | Splinter Review

Description Carl Worth 2006-05-17 08:12:00 UTC
It appears that the cm operator affects the coordinates of a path, but is not
properly tranforming the pen itself used for the stroke.

I know this affects the cairo backend at least, (haven't checked the others),
and I also happen to know that it's fairly easy to get cairo to do the right
thing here. So I'd be happy to provide any guidance needed on this.
Comment 1 Carl Worth 2006-05-17 08:19:27 UTC
Created attachment 5650 [details]
Test case showing buggy rendering

Here's a PDF file that demonstrates the bug. Acroread appears to render this
file as I expect, but poppler renders the top two strokes with a pen that is
too wide, (apparently unaffected by the transformation matrix).

The cairo code that generated this image can be found here:

http://gitweb.cairographics.org/?p=cairo;a=blob;h=HEAD:test/line-width-scale.c

which also shows how to get the desired result with cairo, (which is simply to
set the transform before calling cairo_set_line_width).

-Carl
Comment 2 Jeff Muizelaar 2006-05-17 09:51:51 UTC
Created attachment 5651 [details] [review]
use cairo's affine transformation support instead of ignoring it

rough patch that fixes this problem. I'll clean it up when I get the chance.
Comment 3 Carl Worth 2006-05-24 07:50:28 UTC
The patch solved my original problem, but it may have introduced another. See
what I describe in bug #7014 here:

https://bugs.freedesktop.org/show_bug.cgi?id=7014

-Carl
Comment 4 Jeff Muizelaar 2006-05-28 08:56:32 UTC
Created attachment 5751 [details] [review]
new patch that fixes dashing problems
Comment 5 Jeff Muizelaar 2006-05-31 10:33:03 UTC
Fixed in cvs.
Comment 6 Nickolay V. Shmyrev 2006-07-09 14:08:08 UTC
This patch broke selection with zoom not equal to 100%, although I failed to
find the reason. Can you please test it once again?
Comment 7 Jeff Muizelaar 2006-07-16 15:55:44 UTC
Does adding:
  out->setDefaultCTM(state->getCTM());
below:
  out->startPage (0, state); on line 3315 of TextOutputDev.cc
help?
Comment 8 Nickolay V. Shmyrev 2006-07-17 08:05:17 UTC
Yes, it does. 

That's great, please, commit the change.
Comment 9 Jeff Muizelaar 2006-07-18 17:25:41 UTC
Commited.


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.