Results 1 to 8 of 8

Thread: Printing with a coordinate system given in millimeters

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Location
    Vienna, Austria
    Posts
    57
    Thanks
    24
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Printing with a coordinate system given in millimeters

    This is strange as your example looks correct to me. Maybe "wysota" has an idea.

  2. #2
    Join Date
    Apr 2010
    Posts
    18
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Printing with a coordinate system given in millimeters

    Thanks for reply.
    I resolved my problem in this way: taking in account printer resolution (hoping this is a general solution) :

    QTransform TPiXEL = QTransform::fromScale(
    painter.device()->physicalDpiX() / 25.400,
    painter.device()->physicalDpiY() / 25.400);
    painter.setWorldTransform(TPiXEL, false);

    Thanks.
    Last edited by _Jack_; 30th April 2010 at 15:36. Reason: updated contents

  3. #3
    Join Date
    Oct 2009
    Location
    Vienna, Austria
    Posts
    57
    Thanks
    24
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Printing with a coordinate system given in millimeters

    Are you now using setWorldTransform together with setWindow/setViewport or instead of the method suggested by wysota?

Similar Threads

  1. coordinate system
    By Wojtek.wk in forum Newbie
    Replies: 7
    Last Post: 12th April 2010, 13:47
  2. 2D Graphics on coordinate system
    By soumya in forum Qt Programming
    Replies: 0
    Last Post: 4th November 2009, 06:27
  3. Replies: 1
    Last Post: 9th April 2009, 14:54
  4. The coordinate system
    By avis_phoenix in forum Qt Programming
    Replies: 1
    Last Post: 28th July 2008, 12:16
  5. Replies: 22
    Last Post: 7th December 2007, 09:01

Tags for this Thread

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.