当前位置: 首页>>代码示例>>C++>>正文


C++ RenderObject::absoluteRects方法代码示例

本文整理汇总了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());
}
开发者ID:BackupTheBerlios,项目名称:nirvana-svn,代码行数:14,代码来源:render_inline.cpp

示例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);
}
开发者ID:acss,项目名称:owb-mirror,代码行数:16,代码来源:RenderInline.cpp

示例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());
        }
    }
}
开发者ID:marshall,项目名称:webkit_titanium,代码行数:19,代码来源:RenderContainer.cpp

示例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);
        }
    }
}
开发者ID:JonasZ95,项目名称:EAWebkit,代码行数:21,代码来源:RenderContainer.cpp


注:本文中的RenderObject::absoluteRects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。