Results 1 to 3 of 3

Thread: Legend icon not scaled with renderLegend

  1. #1

    Default Legend icon not scaled with renderLegend

    Hi,
    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);
    8. pixmap.save("pixmap.png");
    To copy to clipboard, switch view to plain text mode 
    I am using Qwt-6.1.0.
    /Claus
    Attached Images Attached Images

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

    Default Re: Legend icon not scaled with renderLegend

    Hi,

    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.

    qwtplot_bitmap_export_curve_thickness3.jpg
    Andreas

  3. #3
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,123
    Thanked 811 Times in 760 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    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 https://bugreports.qt.io/browse/QTBUG-68537 ).

    Uwe

Similar Threads

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

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.