Results 1 to 2 of 2

Thread: Which is faster, drawRect(..) Or drawPath(..) ?

  1. #1
    Join Date
    Sep 2007
    Location
    Pune, India
    Posts
    60
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Which is faster, drawRect(..) Or drawPath(..) ?

    Hi Friends.

    I am drawing 10, 000 + rectangles using GraphicsView/Scene architecture.
    Can anybody tell me which function of QPainter will draw the rects faster.
    Should I use drawRect Or drawPath ? Which will give faster rendering result ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Which is faster, drawRect(..) Or drawPath(..) ?

    drawRect() is not-slower-than drawPath(). In some cases they may lead to the same call, but in most cases drawing a rectangle is faster.

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.