本文整理汇总了C++中SVGInlineTextBox::setLogicalHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGInlineTextBox::setLogicalHeight方法的具体用法?C++ SVGInlineTextBox::setLogicalHeight怎么用?C++ SVGInlineTextBox::setLogicalHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGInlineTextBox
的用法示例。
在下文中一共展示了SVGInlineTextBox::setLogicalHeight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: layoutChildBoxes
void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start, FloatRect* childRect)
{
for (InlineBox* child = start->firstChild(); child; child = child->nextOnLine()) {
FloatRect boxRect;
if (child->isSVGInlineTextBox()) {
ASSERT(child->renderer().isSVGInlineText());
SVGInlineTextBox* textBox = toSVGInlineTextBox(child);
boxRect = textBox->calculateBoundaries();
textBox->setX(boxRect.x());
textBox->setY(boxRect.y());
textBox->setLogicalWidth(boxRect.width());
textBox->setLogicalHeight(boxRect.height());
} else {
// Skip generated content.
if (!child->renderer().node())
continue;
ASSERT_WITH_SECURITY_IMPLICATION(child->isInlineFlowBox());
SVGInlineFlowBox* flowBox = toSVGInlineFlowBox(child);
layoutChildBoxes(flowBox);
boxRect = flowBox->calculateBoundaries();
flowBox->setX(boxRect.x());
flowBox->setY(boxRect.y());
flowBox->setLogicalWidth(boxRect.width());
flowBox->setLogicalHeight(boxRect.height());
}
if (childRect)
childRect->unite(boxRect);
}
}
示例2: layoutChildBoxes
void SVGRootInlineBox::layoutChildBoxes(InlineFlowBox* start)
{
for (InlineBox* child = start->firstChild(); child; child = child->nextOnLine()) {
if (child->isSVGInlineTextBox()) {
ASSERT(child->renderer());
ASSERT(child->renderer()->isSVGInlineText());
SVGInlineTextBox* textBox = static_cast<SVGInlineTextBox*>(child);
IntRect boxRect = textBox->calculateBoundaries();
textBox->setX(boxRect.x());
textBox->setY(boxRect.y());
textBox->setLogicalWidth(boxRect.width());
textBox->setLogicalHeight(boxRect.height());
} else {
ASSERT(child->isInlineFlowBox());
// Skip generated content.
if (!child->renderer()->node())
continue;
SVGInlineFlowBox* flowBox = static_cast<SVGInlineFlowBox*>(child);
layoutChildBoxes(flowBox);
IntRect boxRect = flowBox->calculateBoundaries();
flowBox->setX(boxRect.x());
flowBox->setY(boxRect.y());
flowBox->setLogicalWidth(boxRect.width());
flowBox->setLogicalHeight(boxRect.height());
}
}
}