Results 1 to 3 of 3

Thread: Legend icon not scaled with renderLegend

  1. #1

    Default Legend icon not scaled with renderLegend

    I am rendering a QwtPlot on a pixmap using QwtPlotRenderer and a painter with painter.scale(8,8).
    The whole plot is scaled correctly including the line on the plot and the legend text, but the legend line/icon is not scaled up.
    The QwtPlotCurve pen is set to a width of 3.
    Qt Code:
    1. const int scale = 8;
    2. QPixmap pixmap(width*scale, height*scale);
    3. QPainter painter(&pixmap);
    4. painter.scale(scale,scale);
    5. QRect rect(0,0,width,height);
    6. QwtPlotRenderer rend;
    7. rend.render(plot, &painter, rect);
    To copy to clipboard, switch view to plain text mode 
    I am using Qwt-6.1.0.
    Attached Images Attached Images

  2. #2
    Join Date
    Nov 2006
    Dresden, Germany
    Thanked 6 Times in 6 Posts
    Qt products
    MacOS X Unix/X11 Windows

    Default Re: Legend icon not scaled with renderLegend


    it works for me (Qwt 6.3.0 from trunk) (see attached screenshot).

    Please check if your pen has the cosmetic property set - in my case I specifically disable the cosmetic pen property when exporting the diagram to bitmap/vector.


  3. #3
    Join Date
    Feb 2006
    Munich, Germany
    Thanked 829 Times in 778 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    MacOS X Unix/X11 Windows

    Default Re: Legend icon not scaled with renderLegend

    Recently I made a couple of fixes around pens and scaling of pens. Most of them went in all branches >= 6.2.
    We also crossed a bug in the PDF engine, that should be fixed with Qt 5.11.1 ( see ).


Similar Threads

  1. Replies: 1
    Last Post: 26th May 2015, 07:34
  2. QWT 6.1 Customizing Legend Labels and Icon Position
    By BagpipesJohnson in forum Qwt
    Replies: 3
    Last Post: 14th November 2014, 16:20
  3. Increase legend icon size?
    By torrentss in forum Qwt
    Replies: 2
    Last Post: 1st September 2010, 12:26
  4. How to get Scaled size
    By rogerholmes in forum Newbie
    Replies: 3
    Last Post: 20th March 2010, 16:12
  5. Font is scaled
    By lni in forum Qt Programming
    Replies: 11
    Last Post: 30th January 2009, 21:54


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.