本文整理汇总了C++中InlineBox::calculateBoundaries方法的典型用法代码示例。如果您正苦于以下问题:C++ InlineBox::calculateBoundaries方法的具体用法?C++ InlineBox::calculateBoundaries怎么用?C++ InlineBox::calculateBoundaries使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InlineBox
的用法示例。
在下文中一共展示了InlineBox::calculateBoundaries方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: calculateBoundaries
IntRect SVGInlineFlowBox::calculateBoundaries() const
{
IntRect childRect;
for (InlineBox* child = firstChild(); child; child = child->nextOnLine())
childRect.unite(child->calculateBoundaries());
return childRect;
}
示例2: calculateBoundaries
LayoutRect SVGInlineFlowBox::calculateBoundaries() const
{
LayoutRect childRect;
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
if (!child->isSVGInlineTextBox() && !child->isSVGInlineFlowBox())
continue;
childRect.unite(child->calculateBoundaries());
}
return childRect;
}
示例3: layoutRootBox
void SVGRootInlineBox::layoutRootBox()
{
RenderBlock* parentBlock = block();
ASSERT(parentBlock);
IntRect childRect;
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
// Skip generated content.
if (!child->renderer()->node())
continue;
childRect.unite(child->calculateBoundaries());
}
int xBlock = childRect.x();
int yBlock = childRect.y();
int widthBlock = childRect.width();
int heightBlock = childRect.height();
// Finally, assign the root block position, now that all content is laid out.
parentBlock->setLocation(xBlock, yBlock);
parentBlock->setWidth(widthBlock);
parentBlock->setHeight(heightBlock);
// Position all children relative to the parent block.
for (InlineBox* child = firstChild(); child; child = child->nextOnLine()) {
// Skip generated content.
if (!child->renderer()->node())
continue;
child->adjustPosition(-xBlock, -yBlock);
}
// Position ourselves.
setX(0);
setY(0);
setLogicalWidth(widthBlock);
setLogicalHeight(heightBlock);
setBlockLogicalHeight(heightBlock);
setLineTopBottomPositions(0, heightBlock);
}