Results 1 to 3 of 3

Thread: drawing antialiasing line still looks jagged on IPad mini

  1. #1
    Join Date
    Mar 2011
    Posts
    25
    Thanks
    7
    Qt products
    Qt4

    Default drawing antialiasing line still looks jagged on IPad mini

    I'm drawing a line using the antialiasing flag. This works fine when running my app on MacOS and Windows but looks jagged when running on a tablet (Ipad mini or IPad 2). I'm using Qt 5.2.1

    Any ideas?

    Qt Code:
    1. if (GetShow())
    2. {
    3. QColor penColor = mFocused ? mFocusedFillColor : mNotFocusedFillColor;
    4. penColor.setAlpha( mFocused ? mFocusedOpacity : mNotFocusedOpacity);
    5. QPen pen(penColor, 0, Qt::SolidLine);
    6. if (mOverrideDefualtLineStyle)
    7. pen.setStyle(mLineStyle);
    8.  
    9. int lineWidth = mFocused ? mLineWidthFocused : mLineWidthNotFocused;
    10. pen.setWidth(lineWidth);
    11.  
    12. pen.setCapStyle(Qt::RoundCap);
    13.  
    14. painter->setPen(pen);
    15. painter->setRenderHint(QPainter::Antialiasing, true);
    16. painter->drawLine(mBoxPositionToDraw, mAnchorPositionToDraw);
    17. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2011
    Posts
    25
    Thanks
    7
    Qt products
    Qt4

    Default Re: drawing antialiasing line still looks jagged on IPad mini

    I thought it might be a Qt bug and updated to Qt 5.3.0 but I still see jagged lines. Does anybody else see this?

  3. #3
    Join Date
    Mar 2011
    Posts
    25
    Thanks
    7
    Qt products
    Qt4

    Default Re: drawing antialiasing line still looks jagged on IPad mini


Similar Threads

  1. Drawing multiple line segments
    By twells5 in forum Qt Programming
    Replies: 8
    Last Post: 3rd June 2011, 15:23
  2. Drawing line on table
    By kocakden in forum Qt Programming
    Replies: 7
    Last Post: 29th April 2008, 10:50
  3. drawing an unfixed line?
    By tommy in forum Newbie
    Replies: 7
    Last Post: 26th January 2008, 18:18
  4. Line drawing in Designer
    By Doug Broadwell in forum Newbie
    Replies: 8
    Last Post: 28th March 2007, 01:02
  5. Line drawing
    By kiranraj in forum Qt Programming
    Replies: 1
    Last Post: 29th January 2007, 07:38

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.