Results 1 to 2 of 2

Thread: How to draw arc between two points.

  1. #1
    Join Date
    May 2010
    Posts
    17
    Thanks
    6
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default How to draw arc between two points.

    Hi to all.
    I want to draw arc between two points with center point known .

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to draw arc between two points.

    As you know from Qt Docs, QPainter::drawArc requires a QRect, a startAngle and stopAngle.

    If you know the arc center point e the other two points you can calculate theese values using basic 2D geometry calculation
    Last edited by mcosta; 19th April 2011 at 13:55. Reason: reformatted to look better
    A camel can go 14 days without drink,
    I can't!!!

Similar Threads

  1. Clear previous points when using draw(from,to)
    By huseyinkozan in forum Qwt
    Replies: 4
    Last Post: 1st April 2009, 23:11
  2. Replies: 5
    Last Post: 10th October 2008, 06:44
  3. want to draw points in QGraphicsScene
    By ntp in forum Qt Programming
    Replies: 2
    Last Post: 10th April 2008, 18:14
  4. How to draw some points and lines?
    By luffy27 in forum Qt Programming
    Replies: 1
    Last Post: 24th November 2006, 16:47

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.