本文整理汇总了C++中QwtPlotItem::draw方法的典型用法代码示例。如果您正苦于以下问题:C++ QwtPlotItem::draw方法的具体用法?C++ QwtPlotItem::draw怎么用?C++ QwtPlotItem::draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QwtPlotItem
的用法示例。
在下文中一共展示了QwtPlotItem::draw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: drawItems
void QwtPlot::drawItems( QPainter *painter, const QRectF &canvasRect,
const QwtScaleMap maps[axisCnt] ) const
{
const QwtPlotItemList& itmList = itemList();
for ( QwtPlotItemIterator it = itmList.begin();
it != itmList.end(); ++it )
{
QwtPlotItem *item = *it;
if ( item && item->isVisible() )
{
painter->save();
painter->setRenderHint( QPainter::Antialiasing,
item->testRenderHint( QwtPlotItem::RenderAntialiased ) );
painter->setRenderHint( QPainter::HighQualityAntialiasing,
item->testRenderHint( QwtPlotItem::RenderAntialiased ) );
item->draw( painter,
maps[item->xAxis()], maps[item->yAxis()],
canvasRect );
painter->restore();
}
}
}
示例2: drawItems
void QwtPlot::drawItems(QPainter *painter, const QRect &rect,
const QwtScaleMap map[axisCnt],
const QwtPlotPrintFilter &pfilter) const
{
const QwtPlotItemList& itmList = itemList();
for ( QwtPlotItemIterator it = itmList.begin();
it != itmList.end(); ++it )
{
QwtPlotItem *item = *it;
if ( item && item->isVisible() )
{
if ( !(pfilter.options() & QwtPlotPrintFilter::PrintGrid)
&& item->rtti() == QwtPlotItem::Rtti_PlotGrid )
{
continue;
}
painter->save();
#if QT_VERSION >= 0x040000
painter->setRenderHint(QPainter::Antialiasing,
item->testRenderHint(QwtPlotItem::RenderAntialiased) );
#endif
item->draw(painter,
map[item->xAxis()], map[item->yAxis()],
rect);
painter->restore();
}
}
}
示例3: drawItems
void QwtPlot::drawItems(QPainter *painter, const QRect &rect,
const QwtArray<QwtScaleMap> &map,
const QwtPlotPrintFilter &pfilter) const
{
painter->save();
const QwtPlotItemList& itmList = itemList();
for ( QwtPlotItemIterator it = itmList.begin();
it != itmList.end(); ++it )
{
QwtPlotItem *item = *it;
if ( item && item->isVisible() )
{
if ( !(pfilter.options() & QwtPlotPrintFilter::PrintGrid)
&& item->rtti() == QwtPlotItem::Rtti_PlotGrid )
{
continue;
}
#if QT_VERSION >= 0x040000
const QPaintEngine *pe = painter->device()->paintEngine();
if (pe->hasFeature(QPaintEngine::Antialiasing) )
{
painter->setRenderHint(QPainter::Antialiasing,
item->testRenderHint(QwtPlotItem::RenderAntialiased) );
}
#endif
item->draw(painter,
map[item->xAxis()], map[item->yAxis()],
rect);
}
}
painter->restore();
}