本文整理汇总了C++中RenderObject::absoluteRects方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderObject::absoluteRects方法的具体用法?C++ RenderObject::absoluteRects怎么用?C++ RenderObject::absoluteRects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderObject
的用法示例。
在下文中一共展示了RenderObject::absoluteRects方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: absoluteRects
void RenderInline::absoluteRects(QValueList<QRect>& rects, int _tx, int _ty)
{
for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
rects.append(QRect(_tx + curr->xPos(), _ty + curr->yPos(), curr->width(), curr->height()));
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling())
if (!curr->isText())
curr->absoluteRects(rects, _tx + curr->xPos(), _ty + curr->yPos());
if (continuation())
continuation()->absoluteRects(rects,
_tx - containingBlock()->xPos() + continuation()->xPos(),
_ty - containingBlock()->yPos() + continuation()->yPos());
}
示例2: absoluteRects
void RenderInline::absoluteRects(Vector<IntRect>& rects, int tx, int ty, bool topLevel)
{
for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
rects.append(IntRect(tx + curr->xPos(), ty + curr->yPos(), curr->width(), curr->height()));
for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) {
if (!curr->isText())
curr->absoluteRects(rects, tx + curr->xPos(), ty + curr->yPos(), false);
}
if (continuation() && topLevel)
continuation()->absoluteRects(rects,
tx - containingBlock()->xPos() + continuation()->xPos(),
ty - containingBlock()->yPos() + continuation()->yPos(),
topLevel);
}
示例3: addLineBoxRects
void RenderContainer::addLineBoxRects(Vector<IntRect>& rects, unsigned start, unsigned end, bool)
{
if (!children()->firstChild() && (isInline() || isAnonymousBlock())) {
FloatPoint absPos = localToAbsolute(FloatPoint());
absoluteRects(rects, absPos.x(), absPos.y());
return;
}
if (!children()->firstChild())
return;
unsigned offset = start;
for (RenderObject* child = childAt(start); child && offset < end; child = child->nextSibling(), ++offset) {
if (child->isText() || child->isInline() || child->isAnonymousBlock()) {
FloatPoint absPos = child->localToAbsolute(FloatPoint());
child->absoluteRects(rects, absPos.x(), absPos.y());
}
}
}
示例4: addLineBoxRects
void RenderContainer::addLineBoxRects(Vector<IntRect>& rects, unsigned start, unsigned end, bool)
{
if (!m_firstChild && (isInline() || isAnonymousBlock())) {
int x, y;
absolutePositionForContent(x, y);
absoluteRects(rects, x, y);
return;
}
if (!m_firstChild)
return;
unsigned offset = start;
for (RenderObject* child = childAt(start); child && offset < end; child = child->nextSibling(), ++offset) {
if (child->isText() || child->isInline() || child->isAnonymousBlock()) {
int x, y;
child->absolutePositionForContent(x, y);
child->absoluteRects(rects, x, y);
}
}
}