本文整理汇总了C++中QSvgNode::isVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ QSvgNode::isVisible方法的具体用法?C++ QSvgNode::isVisible怎么用?C++ QSvgNode::isVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSvgNode
的用法示例。
在下文中一共展示了QSvgNode::isVisible方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
void QSvgTinyDocument::draw(QPainter *p, const QRectF &bounds)
{
if (m_time.isNull()) {
m_time.start();
}
if (displayMode() == QSvgNode::NoneMode)
return;
p->save();
//sets default style on the painter
//### not the most optimal way
mapSourceToTarget(p, bounds);
QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
pen.setMiterLimit(4);
p->setPen(pen);
p->setBrush(Qt::black);
p->setRenderHint(QPainter::Antialiasing);
p->setRenderHint(QPainter::SmoothPixmapTransform);
QList<QSvgNode*>::iterator itr = m_renderers.begin();
applyStyle(p, m_states);
while (itr != m_renderers.end()) {
QSvgNode *node = *itr;
if ((node->isVisible()) && (node->displayMode() != QSvgNode::NoneMode))
node->draw(p, m_states);
++itr;
}
revertStyle(p, m_states);
p->restore();
}
示例2: draw
void QSvgTinyDocument::draw(QPainter *p, const QRectF &bounds)
{
if (m_time.isNull()) {
m_time.start();
}
if (m_viewBox.isNull()) {
QMatrix matx = QMatrix();
m_viewBox = transformedBounds(matx);
}
p->save();
//sets default style on the painter
//### not the most optimal way
adjustWindowBounds(p, bounds, m_viewBox);
p->setPen(Qt::NoPen);
p->setBrush(Qt::black);
p->setRenderHint(QPainter::Antialiasing);
p->setRenderHint(QPainter::SmoothPixmapTransform);
QList<QSvgNode*>::iterator itr = m_renderers.begin();
applyStyle(p);
while (itr != m_renderers.end()) {
QSvgNode *node = *itr;
if (node->isVisible())
node->draw(p);
++itr;
}
revertStyle(p);
p->restore();
}
示例3: draw
void QSvgG::draw(QPainter *p, QSvgExtraStates &states)
{
QList<QSvgNode*>::iterator itr = m_renderers.begin();
applyStyle(p, states);
while (itr != m_renderers.end()) {
QSvgNode *node = *itr;
if ((node->isVisible()) && (node->displayMode() != QSvgNode::NoneMode))
node->draw(p, states);
++itr;
}
revertStyle(p, states);
}