~oluseyi-deactivatedaccount/pencil/trunk

« back to all changes in this revision

Viewing changes to src/graphics/bitmap/bitmapimage.cpp

  • Committer: volute
  • Date: 2008-07-10 12:35:55 UTC
  • Revision ID: svn-v4:f509e8e7-a431-0410-8952-ba4f3f4fc37f:trunk:54
Bug fix: solved the issue resulting in parts (left, right, top or bottom edges) of curves not appearing when drawing with the pencil tool. This was caused by the BitmapImage not being updated in a large enough rectangle when invoking drawLine. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
339
339
 
340
340
 
341
341
void BitmapImage::drawLine( QPointF P1, QPointF P2, QPen pen, QPainter::CompositionMode cm, bool antialiasing) {
342
 
        int width = pen.width();
 
342
        int width = 2+pen.width();
343
343
        extend( QRect(P1.toPoint(), P2.toPoint()).normalized().adjusted(-width,-width,width,width) );
344
344
        if(image != NULL && !image->isNull() ) {
345
345
                QPainter painter(image);