本文整理汇总了C++中CLayout::getListOfLocalRenderInformationObjects方法的典型用法代码示例。如果您正苦于以下问题:C++ CLayout::getListOfLocalRenderInformationObjects方法的具体用法?C++ CLayout::getListOfLocalRenderInformationObjects怎么用?C++ CLayout::getListOfLocalRenderInformationObjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLayout
的用法示例。
在下文中一共展示了CLayout::getListOfLocalRenderInformationObjects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CLayout
//.........这里部分代码省略.........
const GraphicalObject* graphical
= dynamic_cast<const GraphicalObject*>(sbmlLayout.getListOfAdditionalGraphicalObjects()->get(i));
if (graphical)
layout->addGeneralGlyph(new CLGeneralGlyph(*graphical, modelmap, layoutmap));
}
//second pass text (the text glyph can refer to other glyphs. These references can)
//only be resolved after all glyphs are created).
iMax = sbmlLayout.getListOfTextGlyphs()->size();
for (i = 0; i < iMax; ++i)
{
const TextGlyph* tmp
= dynamic_cast<const TextGlyph*>(sbmlLayout.getListOfTextGlyphs()->get(i));
if (tmp)
postprocessTextGlyph(*tmp, layoutmap);
}
#ifdef USE_CRENDER_EXTENSION
RenderLayoutPlugin* rlPlugin = (RenderLayoutPlugin*) sbmlLayout.getPlugin("render");
assert(rlPlugin != NULL);
// import the local render information
iMax = rlPlugin->getNumLocalRenderInformationObjects();
std::map<std::string, std::string> idToKeyMap;
CLLocalRenderInformation* pLRI = NULL;
//std::map<std::string,std::string> colorIdToKeyMap;
//std::map<std::string,std::string> gradientIdToKeyMap;
//std::map<std::string,std::string> lineEndingIdToKeyMap;
//std::map<std::string,std::map<std::string,std::string> > colorIdToKeyMapMap;
//std::map<std::string,std::map<std::string,std::string> > gradientIdToKeyMapMap;
//std::map<std::string,std::map<std::string,std::string> > lineEndingIdToKeyMapMap;
for (i = 0; i < iMax; ++i)
{
//colorIdToKeyMap.clear();
//gradientIdToKeyMap.clear();
//lineEndingIdToKeyMap.clear();
//pLRI=new CLLocalRenderInformation(*sbmlLayout.getRenderInformation(i),colorIdToKeyMap,gradientIdToKeyMap,lineEndingIdToKeyMap,layout);
pLRI = new CLLocalRenderInformation(*rlPlugin->getRenderInformation(i), layout);
if (rlPlugin->getRenderInformation(i)->isSetId())
idToKeyMap.insert(std::pair<std::string, std::string>(rlPlugin->getRenderInformation(i)->getId(), pLRI->getKey()));
else
idToKeyMap.insert(std::pair<std::string, std::string>(pLRI->getKey(), pLRI->getKey()));
//colorIdToKeyMapMap.insert(std::pair<std::string,std::map<std::string,std::string> >(pLRI->getKey(),colorIdToKeyMap));
//gradientIdToKeyMapMap.insert(std::pair<std::string,std::map<std::string,std::string> >(pLRI->getKey(),gradientIdToKeyMap));
//lineEndingIdToKeyMapMap.insert(std::pair<std::string,std::map<std::string,std::string> >(pLRI->getKey(),lineEndingIdToKeyMap));
// fix the references to layout objects in id lists
size_t j, jMax = pLRI->getNumStyles();
for (j = 0; j < jMax; j++)
{
SBMLDocumentLoader::convertLayoutObjectIds(*(pLRI->getStyle(j)), layoutmap);
}
layout->addLocalRenderInformation(pLRI);
}
// fix the references
// we have to consider the global ids as well
// since all ids in these two map should be unique, we can just combine them
size_t count = idToKeyMap.size() + globalIdToKeyMap.size();
idToKeyMap.insert(globalIdToKeyMap.begin(), globalIdToKeyMap.end());
// make sure the ids were really unique
assert(idToKeyMap.size() == count);
SBMLDocumentLoader::convertRenderInformationReferencesIds<CLLocalRenderInformation>(layout->getListOfLocalRenderInformationObjects(), idToKeyMap);
// fix the color ids, gradient ids and line ending ids.
/*
std::map<std::string,std::map<std::string,std::string> >::const_iterator mapPos;
std::map<std::string,std::map<std::string,std::string> > expandedColorIdToKeyMapMap, expandedGradientIdToKeyMapMap, expandedLineEndingIdToKeyMapMap;
for(i=0;i < iMax; ++i)
{
pLRI=dynamic_cast<CLLocalRenderInformation*>(layout->getRenderInformation(i));
assert(pLRI != NULL);
std::set<std::string> chain;
SBMLDocumentLoader::expandIdToKeyMaps<CLLocalRenderInformation>(pLRI,
layout->getListOfLocalRenderInformationObjects(),
expandedColorIdToKeyMapMap,
expandedGradientIdToKeyMapMap,
expandedLineEndingIdToKeyMapMap,
colorIdToKeyMapMap,
gradientIdToKeyMapMap,
lineEndingIdToKeyMapMap,
chain,
globalColorIdToKeyMapMap,
globalGradientIdToKeyMapMap,
globalLineEndingIdToKeyMapMap
);
SBMLDocumentLoader::convertPropertyKeys<CLLocalRenderInformation>(pLRI,expandedColorIdToKeyMapMap[pLRI->getKey()],expandedGradientIdToKeyMapMap[pLRI->getKey()],expandedLineEndingIdToKeyMapMap[pLRI->getKey()]);
}
*/
#endif /* USE_CRENDER_EXTENSION */
return layout;
}