Results 1 to 3 of 3

Thread: Is there any Qt function which gives all the connecting between any two coordinates ?

  1. #1
    Join Date
    Jun 2010
    Posts
    26
    Qt products
    Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Is there any Qt function which gives all the connecting between any two coordinates ?

    Hi guys ... I was wondering if there's any predefined Qt function which gives a list of connecting points between any two coordinates in a coordinate system, such that the list of connecting points 'connect' the two coordinates so that there are no breaks between them ... Is there any such function ... ?

    This is similar to drawing a line between any two coordinates, but instead of drawing the line, you store all the points that would be in that line into an array or something, and pass this array as an output ..

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Is there any Qt function which gives all the connecting between any two coordinat

    Not directly, as far as I know.
    But you might want to take a look at a painter path:
    http://doc.qt.nokia.com/4.6/qpainterpath.html

    Or find the points yourself (very easy).

    Why do you want to have that list?
    A line is not defined by more than two points.

  3. #3
    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: Is there any Qt function which gives all the connecting between any two coordinat

    You mean Bresenham's line drawing algorithm?

    http://en.wikipedia.org/wiki/Bresenham's_line_algorithm
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 3
    Last Post: 25th May 2010, 09:46
  2. Replies: 4
    Last Post: 18th March 2010, 10:11
  3. Replies: 0
    Last Post: 10th March 2010, 08:13
  4. Replies: 4
    Last Post: 27th November 2009, 13:00
  5. Replies: 2
    Last Post: 5th June 2008, 21:32

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.