[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kpdf_annotations: kdegraphics/kpdf/core/generator_pdf
From:       Enrico Ros <rosenric () dei ! unipd ! it>
Date:       2005-04-10 12:11:50
Message-ID: 20050410121150.E3FB4495 () office ! kde ! org
[Download RAW message or body]

CVS commit by eros: 

Added a hack because real pdf's HL-QuadPoint structure differs from the
one in specs! (how can it be possible!?)


  M +6 -0      generator_pdf.cpp   1.20.2.10


--- kdegraphics/kpdf/core/generator_pdf/generator_pdf.cpp  #1.20.2.9:1.20.2.10
@@ -1087,4 +1087,10 @@ void PDFGenerator::addAnnotations( Page 
                     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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic