list.push_back(pathNode);
} else if (auto paintNode = dynamic_cast<LOTPaintDataItem *>(i.get())) {
// the node is a paint data node update the path list of the paint item.
- paintNode->addPathItems(list);
+ paintNode->addPathItems(list, curOpCount);
} else if (auto groupNode =
dynamic_cast<LOTContentGroupItem *>(i.get())) {
// update the groups node with current list
groupNode->processPathItems(list);
}
}
- list.erase(list.begin() + curOpCount, list.end());
}
void LOTContentGroupItem::processTrimOperation()
}
-void LOTPaintDataItem::addPathItems(std::vector<LOTPathDataItem *> &list)
+void LOTPaintDataItem::addPathItems(std::vector<LOTPathDataItem *> &list, int startOffset)
{
- mPathItems = list;
+ std::copy(list.begin() + startOffset, list.end(), back_inserter(mPathItems));
}
{
public:
LOTPaintDataItem(bool staticContent);
- void addPathItems(std::vector<LOTPathDataItem *> &list);
+ void addPathItems(std::vector<LOTPathDataItem *> &list, int startOffset);
virtual void update(int frameNo, const VMatrix &parentMatrix, float parentAlpha, const DirtyFlag &flag);
void renderList(std::vector<VDrawable *> &list) final;
protected: