Break out material handling into dedicated class.
This commit is contained in:
parent
fc44c4c623
commit
73051a5f27
17 changed files with 221 additions and 153 deletions
|
@ -77,11 +77,11 @@ void SvgNode::update(SceneInfo* sceneInfo)
|
|||
|
||||
if (mMaterialIsDirty)
|
||||
{
|
||||
if (mHasFillColor)
|
||||
if (mMaterial->hasFillColor())
|
||||
{
|
||||
for (const auto& geom_node : mGeometryNodes)
|
||||
{
|
||||
geom_node->setFillColor(mFillColor);
|
||||
geom_node->setFillColor(mMaterial->getFillColor());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -92,11 +92,11 @@ void SvgNode::update(SceneInfo* sceneInfo)
|
|||
}
|
||||
}
|
||||
|
||||
if (mHasStrokeColor)
|
||||
if (mMaterial->hasStrokeColor())
|
||||
{
|
||||
for (const auto& geom_node : mGeometryNodes)
|
||||
{
|
||||
geom_node->setStrokeColor(mStrokeColor);
|
||||
geom_node->setStrokeColor(mMaterial->getStrokeColor());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue