C++ (Qt) QImage im(widthPx, heightPx, QImage::Format_RGB32); im.fill(Qt::lightGray); renderer.renderTo(w.plot_, im); im.save("C:/temp/image2.png");
C++ (Qt)void QwtPlotRenderer::renderScale( const QwtPlot *plot, QPainter *painter, int axisId, int startDist, int endDist, int baseDist, const QRectF &rect ) const{ //... double x, y, w; switch ( axisId ) { case QwtPlot::yLeft: { x = rect.right() - 1.0 - baseDist; y = rect.y() + startDist; w = rect.height() - startDist - endDist; align = QwtScaleDraw::LeftScale; break; }