本文整理汇总了C++中GridLayout::computeBoundingBox方法的典型用法代码示例。如果您正苦于以下问题:C++ GridLayout::computeBoundingBox方法的具体用法?C++ GridLayout::computeBoundingBox怎么用?C++ GridLayout::computeBoundingBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GridLayout
的用法示例。
在下文中一共展示了GridLayout::computeBoundingBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doCall
void MixedModelLayout::doCall(
PlanRep &PG,
adjEntry adjExternal,
GridLayout &gridLayout,
IPoint &boundingBox,
bool fixEmbedding)
{
// handle graphs with less than 3 nodes
node v1, v2;
switch (PG.numberOfNodes()) {
case 0:
boundingBox = IPoint(0,0);
return;
case 1:
v1 = PG.firstNode();
gridLayout.x(v1) = gridLayout.y(v1) = 0;
boundingBox = IPoint(0,0);
return;
case 2:
v1 = PG.firstNode();
v2 = v1->succ();
gridLayout.x(v1) = gridLayout.y(v1) = gridLayout.y(v2) = 0;
gridLayout.x(v2) = 1;
boundingBox = IPoint(1,0);
return;
}
MixedModelBase mm(PG,gridLayout);
if(fixEmbedding) {
OGDF_ASSERT(PG.representsCombEmbedding());
PlanarAugmentationFix fixAugmenter;
mm.computeOrder(fixAugmenter, 0, adjExternal, m_compOrder.get());
} else
mm.computeOrder(m_augmenter.get(),&m_embedder.get(),0,m_compOrder.get());
mm.assignIopCoords();
mm.placeNodes();
mm.postprocessing1();
mm.setBends();
mm.postprocessing2();
m_crossingsBeautifier.get().call(PG,gridLayout);
int xmin, ymin;
gridLayout.computeBoundingBox(xmin,boundingBox.m_x,ymin,boundingBox.m_y);
}