From kde-commits Mon Apr 11 21:43:43 2005 From: Enrico Ros Date: Mon, 11 Apr 2005 21:43:43 +0000 To: kde-commits Subject: kpdf_annotations: kdegraphics/kpdf/core (silent) Message-Id: <20050411214343.CB973633 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=111325583714962 CVS commit by eros: CVS_SILENT some primitives to test M +37 -0 page.cpp 1.20.2.9 --- kdegraphics/kpdf/core/page.cpp #1.20.2.8:1.20.2.9 @@ -44,4 +44,41 @@ KPDFPage::KPDFPage( uint page, double w, if ( m_height <= 0 ) m_height = 1; + + // ### ### ### create dummy annot for testing + HighlightAnnotation * ann = new HighlightAnnotation(); + HighlightAnnotation::Quad q; + q.points[0].x = 0.1; + q.points[0].y = 0.1; + q.points[1].x = 0.0; + q.points[1].y = 0.2; + q.points[2].x = 0.1; + q.points[2].y = 0.3; + q.points[3].x = 0.2; + q.points[3].y = 0.2; + ann->highlightQuads.append( q ); + + q.points[0].x = 0.5; + q.points[0].y = 0.2; + q.points[1].x = 0.8; + q.points[1].y = 0.2; + q.points[2].x = 0.8; + q.points[2].y = 0.1; + q.points[3].x = 0.5; + q.points[3].y = 0.1; + ann->highlightQuads.append( q ); + + q.points[0].x = 0.5; + q.points[0].y = 0.1; + q.points[1].x = 0.4; + q.points[1].y = 0.3; + q.points[2].x = 0.7; + q.points[2].y = 0.5; + q.points[3].x = 0.55; + q.points[3].y = 0.75; + ann->highlightQuads.append( q ); + + ann->boundary = NormalizedRect( 0.0, 0.0, 1.0, 1.0 ); + ann->flags = Annotation::External; + m_annotations.append( ann ); }