Commit db4e2246 authored by Enrico Ros's avatar Enrico Ros
Browse files

Added a hack because real pdf's HL-QuadPoint structure differs from the

one in specs! (how can it be possible!?)

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=404553
parent 7201ed77
......@@ -1086,6 +1086,12 @@ void PDFGenerator::addAnnotations( Page * pdfPage, KPDFPage * page )
for ( int p = 0; p < 4; p++ )
XPDFReader::transform( MTX, c[ q + p*2 ], c[ q + p*2 + 1 ],
&quad.points[ p ].x, &quad.points[ p ].y );
// ### PDF1.6 specs says that point are in ccw order, but in fact
// points 3 and 4 are swapped in every PDF around!
NormalizedPoint tmpPoint = quad.points[ 2 ];
quad.points[ 2 ] = quad.points[ 3 ];
quad.points[ 3 ] = tmpPoint;
// initialize other oroperties and append quad
quad.capStart = true; // unlinked quads are always capped
quad.capEnd = true; // unlinked quads are always capped
quad.feather = 0.1; // default feather
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment