Results 1 to 2 of 2

Thread: draw ellipse with specific points in scene

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default draw ellipse with specific points in scene

    hi friends,Experts,
    i want to know how i can draw ellipse with the three points marked in the qgraphicsscene . say if the user selects three points in the scene using mousePress i will highlight the pressed points with marks . now using the the three marks i have to draw an ellipse around the three marks or making the points as a boundary for the ellipse i draw .circlemark.png . please help me . suggest me the way i can implement .
    "Behind every great fortune lies a crime" - Balzac

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: draw ellipse with specific points in scene

    i want to know how i can draw ellipse with the three points marked in the qgraphicsscene
    It better be a circle (there will be infinitely many ellipses that pass through those points).

    Read more about Circumscribed circle, all the required math is mentioned there. All you need to do is calculate the circle centre and radius, and use Qt API void drawEllipse(const QPoint & center, int rx, int ry);
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. How does one draw a 'cut down' ellipse using QPainter
    By Eos Pengwern in forum Qt Programming
    Replies: 3
    Last Post: 24th July 2012, 01:01
  2. How to draw arc between two points.
    By nikhil in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2011, 13:55
  3. Plotting specific points with qwt
    By byb810 in forum Qwt
    Replies: 0
    Last Post: 30th July 2009, 15:42
  4. How to draw a semi circle or arc of ellipse
    By parnedo in forum Qt Programming
    Replies: 2
    Last Post: 2nd July 2009, 01:39
  5. want to draw points in QGraphicsScene
    By ntp in forum Qt Programming
    Replies: 2
    Last Post: 10th April 2008, 18:14

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.