Initial scene to svg conversion.
This commit is contained in:
parent
65ac927929
commit
1fc730d413
15 changed files with 164 additions and 28 deletions
|
@ -55,16 +55,15 @@ void OpenGlPainter::paint(DrawingContext* context)
|
|||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
auto scene = context->getSurface()->getScene();
|
||||
for(unsigned idx=0; idx<scene->getNumItems(); idx++)
|
||||
for (const auto item : scene->getItems())
|
||||
{
|
||||
auto scene_item = scene->getItem(idx);
|
||||
if (scene_item->getType() == SceneItem::Type::MODEL)
|
||||
if (item->getType() == SceneItem::Type::MODEL)
|
||||
{
|
||||
mMeshPainter->paint(dynamic_cast<SceneModel*>(scene_item), context);
|
||||
mMeshPainter->paint(dynamic_cast<SceneModel*>(item), context);
|
||||
}
|
||||
else if (scene_item->getType() == SceneItem::Type::TEXT)
|
||||
else if (item->getType() == SceneItem::Type::TEXT)
|
||||
{
|
||||
mTextPainter->paint(dynamic_cast<SceneText*>(scene_item), context);
|
||||
mTextPainter->paint(dynamic_cast<SceneText*>(item), context);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue