Bug 11719 - Implement clipToStrokePath() in CairoOutputDev
Implement clipToStrokePath() in CairoOutputDev
Status: RESOLVED FIXED
Product: poppler
Classification: Unclassified
Component: cairo backend
unspecified
Other All
: medium normal
Assigned To: poppler-bugs
:
: 15617 17139 18391 20326 20487 21585 25312 27082 27882 28944 30828 31060 36857 39009 (view as bug list)
Depends on:
Blocks: 12143
  Show dependency treegraph
 
Reported: 2007-07-25 00:50 UTC by Carlos Garcia Campos
Modified: 2011-08-22 06:09 UTC (History)
12 users (show)

See Also:


Attachments
PDF that doesn't render correctly (79.06 KB, application/pdf)
2007-07-25 00:51 UTC, Carlos Garcia Campos
Details
fix stroke patterns (5.16 KB, patch)
2011-08-19 07:04 UTC, Adrian Johnson
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2007-07-25 00:50:04 UTC
Bug forwarded from Evince: http://bugzilla.gnome.org/show_bug.cgi?id=460132

"Please describe the problem:
Some PDFs (example attached) don't render correctly. The problem might be the
table, it just generates a huge grey box over the texts. Document prints fine,
only viewing in Evince is broken

Steps to reproduce:
1. Open attached pdf
2. Look at the output
3. Test printing to see it prints fine


Actual results:
You see a garbled pdf with grey boxes (text can be selected underneath those
though)

Expected results:
I'd see a normal version of this pdf

Does this happen every time?
yes"

It's only reproducible with cairo backend.
Comment 1 Carlos Garcia Campos 2007-07-25 00:51:20 UTC
Created attachment 10875 [details]
PDF that doesn't render correctly

Europython invoice that doesn't show up correctly
Comment 2 Carlos Garcia Campos 2009-08-09 08:36:23 UTC
The problem is that clipToStrokePath() is not implemented in cairo backend, so we are filling the whole area with the tiling pattern instead of just the area that would be affected by a stroke. 
We need cairo_stroke_to_path() which is not yet implemented in cairo :-(
Comment 3 Carlos Garcia Campos 2009-08-09 08:37:09 UTC
*** Bug 17139 has been marked as a duplicate of this bug. ***
Comment 4 Carlos Garcia Campos 2009-08-09 10:09:19 UTC
*** Bug 20326 has been marked as a duplicate of this bug. ***
Comment 5 Carlos Garcia Campos 2009-08-09 10:45:44 UTC
*** Bug 15617 has been marked as a duplicate of this bug. ***
Comment 6 Carlos Garcia Campos 2010-01-29 02:03:08 UTC
*** Bug 18391 has been marked as a duplicate of this bug. ***
Comment 7 Carlos Garcia Campos 2010-01-29 02:04:49 UTC
*** Bug 20487 has been marked as a duplicate of this bug. ***
Comment 8 Carlos Garcia Campos 2010-01-29 02:09:57 UTC
*** Bug 25312 has been marked as a duplicate of this bug. ***
Comment 9 Carlos Garcia Campos 2010-01-29 02:26:23 UTC
*** Bug 21585 has been marked as a duplicate of this bug. ***
Comment 10 Carlos Garcia Campos 2010-03-15 12:34:12 UTC
*** Bug 27082 has been marked as a duplicate of this bug. ***
Comment 11 Carlos Garcia Campos 2010-04-30 06:32:59 UTC
*** Bug 27882 has been marked as a duplicate of this bug. ***
Comment 12 Carlos Garcia Campos 2010-07-09 02:57:24 UTC
*** Bug 28944 has been marked as a duplicate of this bug. ***
Comment 13 Carlos Garcia Campos 2010-10-13 08:20:08 UTC
*** Bug 30828 has been marked as a duplicate of this bug. ***
Comment 14 Carlos Garcia Campos 2010-10-30 06:25:25 UTC
*** Bug 31060 has been marked as a duplicate of this bug. ***
Comment 15 madbiologist 2010-10-30 23:33:19 UTC
The duplicates of this bug are continuing to pile up.

Do we have a schedule/target for when this will be implemented?
Comment 16 Carlos Garcia Campos 2010-10-31 01:31:14 UTC
It doesn't depend on poppler actually, we need cairo_stroke_to_path() in cairo. It's in the RoadMap for cairo 1.12.
Comment 17 Adrian Johnson 2011-08-19 06:38:20 UTC
*** Bug 36857 has been marked as a duplicate of this bug. ***
Comment 18 Adrian Johnson 2011-08-19 07:04:40 UTC
Created attachment 50376 [details] [review]
fix stroke patterns

This patch implements a workaround for stroke patterns. It seems to work on the various test cases in this bug and its duplicates.
Comment 19 Carlos Garcia Campos 2011-08-19 07:16:47 UTC
(In reply to comment #18)
> Created an attachment (id=50376) [details]
> fix stroke patterns
> 
> This patch implements a workaround for stroke patterns. It seems to work on the
> various test cases in this bug and its duplicates.

Awesome! Albert, it would be really nice to have this patch in 0.18, could you please run the regtests with it, please? I'll review the code as soon as I'm back from holidays.

Thanks Arian!
Comment 20 Carlos Garcia Campos 2011-08-19 07:17:32 UTC
(In reply to comment #19)

> Thanks Arian!

 Adrian! :-)
Comment 21 Albert Astals Cid 2011-08-21 07:43:03 UTC
I've run the regtest and the png generated files differ in
../bug117919.pdf
../bug142969.pdf
../bug211227.pdf
../bug223359.pdf
../bug280330.pdf
../bug-poppler11719.pdf
../bug-poppler12810.pdf
../bug-poppler16878-2.pdf
../bug-poppler17139.pdf
../bug-poppler17473.pdf
../bug-poppler17852.pdf
../bug-poppler18391.pdf
../bug-poppler20487.pdf
../bug-poppler20668.pdf
../bug-poppler21491.pdf
../bug-poppler24733.pdf
../bug-poppler25312.pdf
../bug-poppler27482-2.pdf
../bug-poppler28944.pdf
../bug-poppler29060.pdf
../bug-poppler30828.pdf
../bug-poppler31060.pdf
../bug-poppler31687.pdf
../bug-poppler39009-2.pdf
../bug-poppler39009.pdf
../bug-poppler9443.pdf
../Radio Propagation and Adaptive Antennas for Wireless Communication Links (2006).pdf
../redhat701958.pdf
../source_no_compartir.pdf
../tauya.f8.pdf

I've had a look at the differences and in some files i can not appreciate the difference at all and in others there is a clear improvement so i think that if the code looks good seems an improvement to me (i.e. maybe it is not a 100% good fix but seems to cause improvements and no regressions)

Carlos are you commiting it?
Comment 22 Adrian Johnson 2011-08-22 01:46:17 UTC
*** Bug 39009 has been marked as a duplicate of this bug. ***
Comment 23 Carlos Garcia Campos 2011-08-22 06:09:55 UTC
Pushed to git master :-)