add toImage() function to QSGPainterNode
This commit is contained in:
parent
6f2c2b5dbe
commit
166829bbde
|
@ -407,5 +407,12 @@ void QSGPainterNode::setContentsScale(qreal s)
|
|||
markDirty(DirtyMaterial);
|
||||
}
|
||||
|
||||
QImage QSGPainterNode::toImage() const
|
||||
{
|
||||
if (m_actualRenderTarget == QSGPaintedItem::Image)
|
||||
return m_image;
|
||||
else
|
||||
return m_fbo->toImage();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
@ -99,6 +99,7 @@ public:
|
|||
void setContentsScale(qreal s);
|
||||
qreal contentsScale() const { return m_contentsScale; }
|
||||
|
||||
QImage toImage() const;
|
||||
void update();
|
||||
|
||||
void paint();
|
||||
|
|
Loading…
Reference in New Issue