14 #include <qsvgrenderer.h> 89 const QString &fileName )
109 const QByteArray &data )
148 const QRectF &canvasRect )
const 151 xMap, yMap, canvasRect.toRect() );
153 if ( bRect.isValid() && cRect.isValid() )
156 if ( bRect.contains( cRect ) )
172 const QRectF &
viewBox,
const QRectF &rect )
const 174 if ( !viewBox.isValid() )
181 r.setLeft ( qRound( r.left() ) );
182 r.setRight ( qRound( r.right() ) );
183 r.setTop ( qRound( r.top() ) );
184 r.setBottom ( qRound( r.bottom() ) );
202 if ( !rect.isValid() || !br.isValid() || sz.isNull() )
213 const double x1 = xMap.
transform( rect.left() );
214 const double x2 = xMap.
transform( rect.right() );
215 const double y1 = yMap.
transform( rect.bottom() );
216 const double y2 = yMap.
transform( rect.top() );
218 return QRectF( x1, y1, x2 - x1, y2 - y1 );
virtual void legendChanged()
virtual void draw(QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &rect) const
QwtPlotSvgItem(const QString &title=QString())
Constructor.
void setScaleInterval(double s1, double s2)
Specify the borders of the scale interval.
void render(QPainter *painter, const QRectF &viewBox, const QRectF &rect) const
The item is represented on the legend.
void setPaintInterval(double p1, double p2)
Specify the borders of the paint device interval.
A class representing a text.
void setZ(double z)
Set the z value.
virtual ~QwtPlotSvgItem()
Destructor.
double invTransform(double p) const
virtual void itemChanged()
bool loadFile(const QRectF &, const QString &fileName)
Base class for items on the plot canvas.
void setItemAttribute(ItemAttribute, bool on=true)
double transform(double s) const
virtual QRectF boundingRect() const
Bounding rectangle of the item.
bool loadData(const QRectF &, const QByteArray &)
const QSvgRenderer & renderer() const
QRectF viewBox(const QRectF &area) const
static bool roundingAlignment()
const QwtText & title() const
virtual QRectF boundingRect() const