Results 1 to 6 of 6

Thread: Working with coordinates (QGraphicsScene/view)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Working with coordinates (QGraphicsScene/view)

    Hi,

    Interesting chunk of code. Just give me a bit of time to go throught it.
    My app can work on screens (14'',15'',17'',19'',21'',25'',27'',32''); default resolution is 1024x768, but can be bigger/smaller.
    Any other code/explanations appreciated.

    Correct me if I am wrong, but these are the sample results:
    * Screen Res: 1024x768, Diagonal Size: 19", Pixel size: 0.377mm
    * Screen Res: 800x600, Diagonal Size: 17", Pixel size: 0.4318mm
    * Screen Res: 640x480, Diagonal Size: 15", Pixel size: 0.4763mm
    Ok. Let's say I map view's PV(x1,y1) and get as the result scene coordinates PS(x2,y2). At some point PS(x2,y2) are not correct(not precise), then I should calculate the PS using the code above?
    So the faktor has to be more than 1.1 and that's why you define as fallows:
    #define _FAKTOR_PIX_POINT_ 1.3
    I am not 100% sure if totally understand the idea.

    THanks.

    Kacper
    Last edited by maverick_pol; 27th March 2008 at 08:17.
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

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.