Results 1 to 3 of 3

Thread: Finding intersection point

  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Qt products
    Qt4
    Platforms
    Windows Android
    Thanks
    14
    Thanked 13 Times in 13 Posts

    Default Finding intersection point

    Hi,

    Is there a way to find point or points of intersection of 2 graphics items ?

    Thanks in advance

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 89 Times in 87 Posts

    Default Re: Finding intersection point

    Try:
    Qt Code:
    1. QPainterPath pp1 = GraphicsItem1.clipPath();
    2. QPainterPath pp2 = GraphicsItem2.clipPath();
    3. QPainterPath pp3 = pp1.intersected(pp2);
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Qt products
    Qt4
    Platforms
    Windows Android
    Thanks
    14
    Thanked 13 Times in 13 Posts

    Default Re: Finding intersection point

    Hi again,

    but how can I get the points from pp3?
    Last edited by zgulser; 14th October 2009 at 08:56.

Similar Threads

  1. display a plot point by point
    By oswalidos in forum Newbie
    Replies: 32
    Last Post: 13th March 2009, 15:37
  2. how to paint scene point by point
    By elessaar in forum Qt Programming
    Replies: 8
    Last Post: 4th September 2008, 20:00
  3. finding the Intersection of two lines
    By babu198649 in forum Newbie
    Replies: 1
    Last Post: 8th June 2008, 13:16
  4. Check a point inside or outside a road?
    By kstking in forum Qt Programming
    Replies: 1
    Last Post: 15th October 2007, 18:48
  5. Moving the (0.0) point on the scene
    By maverick_pol in forum Qt Programming
    Replies: 1
    Last Post: 6th September 2007, 15:34

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
  •  
Qt is a trademark of The Qt Company.