//qDebug() << "createTextureFromId" << m_surface->texture() << m_surface->geometry().size();
m_texture = canvas()->sceneGraphEngine()->createTextureFromId(m_surface->texture(),
m_surface->geometry().size());
+ m_texture_needs_flipping = true;
} else {
m_texture = canvas()->sceneGraphEngine()->createTextureFromImage(m_surface->image());
+ m_texture_needs_flipping = false;
}
emit textureChanged();
: QSGItem(parent)
, m_surface(0)
, m_texture(0)
+ , m_texture_needs_flipping(false)
{
}
: QSGItem(parent)
, m_surface(0)
, m_texture(0)
+ , m_texture_needs_flipping(false)
{
init(surface);
}
}
node->setTexture(m_texture);
- node->setRect(QRectF(0, 0, width(), height()));
+ if (m_texture_needs_flipping)
+ node->setRect(0, height(), width(), -height());
+ else
+ node->setRect(0, 0, width(), height());
+
node->setFiltering(smooth() ? QSGTexture::Linear : QSGTexture::Nearest);
return node;