[
https://issues.apache.org/jira/browse/PDFBOX-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14241451#comment-14241451
]
Tilman Hausherr commented on PDFBOX-1094:
-----------------------------------------
A matrix of
{code}
[ 0 1 tx ]
[ -1 0 ty ]
{code}
is not really a matrix with a scale factor of 0, nor is it an "invalid matrix",
it is a valid matrix with a rotation of 270°. A rotation is expressed as
{code}
[ cos(rot) -sin(rot) 0]
[ sin(rot) cos(rot) 0]
{code}
See also
http://people.cs.clemson.edu/~dhouse/courses/401/notes/affines-matrices.pdf
page 5.
The scaling of this matrix is 1, i.e. shapes don't get bigger or smaller.
So if somebody extracts the "scale" elements and uses them as a factor, it will
go wrong (that's what happened in PDFBOX-1931). I also doubt that the code from
[ https://svn.apache.org/r1643042 ] in PDTilingPattern.getMatrix() is correct,
as your assumptions ("invalid matrices", "scaling factor of zero") are
incorrect and you admit yourself in a comment that the code is "pure
guesswork". (To be fair, I made the same wrong assumptions in PDFBOX-1931, but
I kept the code that worked).
You can find this 270° rotation matrix pattern R10 in gs-bugzilla6917151.pdf.
The pattern stream is two horizontal red lines. Because of the matrix above,
the lines are vertical in Adobe Reader.
> Pattern colorspace support
> --------------------------
>
> Key: PDFBOX-1094
> URL: https://issues.apache.org/jira/browse/PDFBOX-1094
> Project: PDFBox
> Issue Type: Improvement
> Components: Rendering
> Affects Versions: 1.6.0, 2.0.0
> Reporter: Andreas Lehmkühler
> Priority: Blocker
> Fix For: 2.0.0
>
> Attachments: ColoredTilingPaint.patch, PATTYP1.pdf, PATTYP2.pdf,
> PDF32000_2008_pg737.pdf, PDFBOX-1094-065514-XStep32767.pdf,
> PDFBOX-1094-094730.pdf, PDFBOX-1094-096213-p18.pdf,
> PDFBOX-1094-118358-Step-32767.pdf, PDFBOX-1094-PDFBOX-269.pdf,
> PDFBOX-1094-tiling_pattern.pdf-1-broken-tiles-with-ceil.png,
> PDFBOX-1861-tracemonkey13.png, PDFStreamEngine.patch, PageDrawer.patch,
> _pdfbox-1094-tiling_pattern.pdf-1-blurry.png, bugzilla8677511.jpg,
> gs-bugzilla688728.pdf, gs-bugzilla691715.pdf, gs-bugzilla692152.pdf,
> gs-bugzilla692503.ai, gs-bugzilla693653.pdf, gs-bugzilla694385.pdf,
> jagpdf_doc_patterns.pdf, jagpdf_doc_patterns.pdf-1.png,
> pdfbox-1094-pdf32000_2008_pg737.pdf-1.png,
> pdfbox-1094-pdf32000_2008_pg737.pdf-1.png, pdfbox-1094-pdfbox-269.pdf-2.png,
> pdfbox-1094-tiling_pattern.pdf-1.png, pdfbox-1094-tiling_pattern.pdf-1.png,
> pdfbox-1094-tiling_pattern.pdf-1.png, pdfbox-1861-tracemonkey.pdf-13.png,
> pdfbox-1861-tracemonkey.pdf-13.png, tiling_pattern.pdf,
> v2_tiling_patterns_v2.patch
>
>
> PDFBox doesn't support PDPattern colorspaces
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)