本文整理汇总了C++中RenderObject::absolutePositionForContent方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderObject::absolutePositionForContent方法的具体用法?C++ RenderObject::absolutePositionForContent怎么用?C++ RenderObject::absolutePositionForContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderObject
的用法示例。
在下文中一共展示了RenderObject::absolutePositionForContent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IntSize
LayoutState::LayoutState(RenderObject* root)
: m_clipped(false)
{
RenderObject* container = root->container();
int x = 0;
int y = 0;
container->absolutePositionForContent(x, y);
m_offset = IntSize(x, y);
m_next = 0;
}
示例2: 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);
}
}
}