From 03bdb7d79e264069ca89cfd20ffded4eef7b6f41 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Sun, 24 Apr 2005 10:03:25 +0000 Subject: [PATCH] CVS_SILENT sync comments svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=407470 --- ui/pagepainter.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ui/pagepainter.cpp b/ui/pagepainter.cpp index 226990fa0..6510ccba8 100644 --- a/ui/pagepainter.cpp +++ b/ui/pagepainter.cpp @@ -665,6 +665,8 @@ void PagePainter::drawShapeOnImage( path.move_to( normPath[ 0 ].x * fImageWidth, normPath[ 0 ].y * fImageHeight ); for ( int i = 1; i < pointsNumber; i++ ) path.line_to( normPath[ i ].x * fImageWidth, normPath[ i ].y * fImageHeight ); + //path.curve4( normPath[ i ].x * fImageWidth + 2, normPath[ i ].y * fImageHeight - 2, + // normPath[ i ].x * fImageWidth, normPath[ i ].y * fImageHeight ); if ( closeShape ) path.close_polygon(); @@ -689,7 +691,7 @@ void PagePainter::drawShapeOnImage( span[ x ] = agg::rgba8(c); } for( int y = 0; y < imageHeight; y++ ) - pixels.blend_color_hspan( 0, y, imageWidth, span, 0, (255*y)/imageHeight ); + pixels.blend_color_hspan( 0, y, imageWidth, span, 0, (123*y)/imageHeight ); #endif // fill rect @@ -708,7 +710,15 @@ void PagePainter::drawShapeOnImage( { const QColor & penColor = pen.color(); render.color( agg::rgba8( penColor.red(), penColor.green(), penColor.blue() ) ); +#if 0 + // BSPLINE curve over path + typedef agg::conv_bspline< agg::path_storage > conv_bspline_type; + conv_bspline_type bspline( path ); + bspline.interpolation_step( 0.2 ); + agg::conv_stroke< conv_bspline_type > strokedPath( bspline ); +#else agg::conv_stroke< agg::path_storage > strokedPath( path ); +#fi strokedPath.width( penWidth ); rasterizer.add_path( strokedPath ); agg::render_scanlines( rasterizer, scanline, render );