Results 1 to 2 of 2

Thread: QwtPlotRenderer from MM to Pixel

  1. #1
    Join Date
    Dec 2017
    Posts
    11
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default QwtPlotRenderer from MM to Pixel

    Hello,
    I am trying to implement a printing method that allows the user to pick the size of the plot in millimeters, while keeping the aspect ratio. So far I have achieved a fixed 1:1 aspect ratio for the widget display, but when it comes to printing, I don't know how to keep this ratio. It would be simple if I would only print the canvas, since I would just need to set both width and length to be equal in the QSizeF. However, I want to be able to decide whether to include the bottom x and left y axis in the printed file, and therefore I don't know how to set the QSizeF in such a way that the axis widgets are included and the canvas remains nice looking, that is, with the fixed aspect ratio.
    I am still collecting information, but I am getting confused with the settings, that is, should I set the parameters on the QPrinter, on the QPainter or on the QPlotRenderer?
    I would be very grateful if someone could give me some directions to follow,
    Thanks,
    Jorge

  2. #2
    Join Date
    Nov 2006
    Location
    Dresden, Germany
    Posts
    72
    Thanks
    8
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlotRenderer from MM to Pixel

    Hi Jorge,

    what is the intended target format: raster (jpeg/png) or vector?

    -Andreas
    Andreas

Similar Threads

  1. Replies: 0
    Last Post: 1st February 2014, 17:35
  2. Filling a pie pixel by pixel
    By pradhan in forum Qt Programming
    Replies: 1
    Last Post: 10th December 2013, 09:33
  3. Replies: 2
    Last Post: 17th February 2012, 00:10
  4. Possible bug in QwtPlotRenderer
    By BettaUseYoNikes in forum Qwt
    Replies: 1
    Last Post: 29th November 2011, 09:00
  5. QPixmap pixel by pixel ?
    By tommy in forum Qt Programming
    Replies: 19
    Last Post: 3rd December 2007, 23:52

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.