10 #ifndef QWT_PLOT_RENDERER_H
11 #define QWT_PLOT_RENDERER_H
51 DiscardBackground = 0x01,
60 DiscardCanvasBackground = 0x08,
72 DiscardCanvasFrame = 0x20
76 Q_DECLARE_FLAGS( DiscardFlags, DiscardFlag )
91 FrameWithScales = 0x01
94 Q_DECLARE_FLAGS( LayoutFlags, LayoutFlag )
99 void setDiscardFlag( DiscardFlag flag,
bool on =
true );
100 bool testDiscardFlag( DiscardFlag flag )
const;
102 void setDiscardFlags( DiscardFlags flags );
103 DiscardFlags discardFlags()
const;
105 void setLayoutFlag( LayoutFlag flag,
bool on =
true );
106 bool testLayoutFlag( LayoutFlag flag )
const;
108 void setLayoutFlags( LayoutFlags flags );
109 LayoutFlags layoutFlags()
const;
111 void renderDocument(
QwtPlot*,
const QString& fileName,
112 const QSizeF& sizeMM,
int resolution = 85 );
115 const QString& fileName,
const QString&
format,
116 const QSizeF& sizeMM,
int resolution = 85 );
120 void renderTo(
QwtPlot*, QSvgGenerator& )
const;
124 #ifndef QT_NO_PRINTER
125 void renderTo(
QwtPlot*, QPrinter& )
const;
128 void renderTo(
QwtPlot*, QPaintDevice& )
const;
131 QPainter*,
const QRectF& plotRect )
const;
133 virtual void renderTitle(
const QwtPlot*,
134 QPainter*,
const QRectF& titleRect )
const;
136 virtual void renderFooter(
const QwtPlot*,
137 QPainter*,
const QRectF& footerRect )
const;
139 virtual void renderScale(
const QwtPlot*, QPainter*,
141 int baseDist,
const QRectF& scaleRect )
const;
143 virtual void renderCanvas(
const QwtPlot*,
144 QPainter*,
const QRectF& canvasRect,
147 virtual void renderLegend(
148 const QwtPlot*, QPainter*,
const QRectF& legendRect )
const;
150 bool exportTo(
QwtPlot*,
const QString& documentName,
151 const QSizeF& sizeMM = QSizeF( 300, 200 ),
int resolution = 85 );
154 void buildCanvasMaps(
const QwtPlot*,
157 bool updateCanvasMargins(
QwtPlot*,
165 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotRenderer::DiscardFlags )
166 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPlotRenderer::LayoutFlags )