本文整理汇总了C++中webcore::FrameView::paintContents方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameView::paintContents方法的具体用法?C++ FrameView::paintContents怎么用?C++ FrameView::paintContents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::FrameView
的用法示例。
在下文中一共展示了FrameView::paintContents方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: renderPrivate
void QWebFramePrivate::renderPrivate(QPainter *painter, const QRegion &clip, bool contents)
{
if (!frame->view() || !frame->contentRenderer())
return;
QVector<QRect> vector = clip.rects();
if (vector.isEmpty())
return;
WebCore::FrameView* view = frame->view();
view->layoutIfNeededRecursive();
GraphicsContext context(painter);
if (!contents)
view->paint(&context, vector.first());
else
view->paintContents(&context, vector.first());
for (int i = 1; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
painter->save();
painter->setClipRect(clipRect, Qt::IntersectClip);
if (!contents)
view->paint(&context, clipRect);
else
view->paintContents(&context, clipRect);
painter->restore();
}
}
示例2: renderRelativeCoords
void QWebFrameAdapter::renderRelativeCoords(QPainter* painter, int layers, const QRegion& clip)
{
GraphicsContext context(painter);
if (context.paintingDisabled() && !context.updatingControlTints())
return;
if (!frame->view() || !frame->contentRenderer())
return;
QVector<QRect> vector = clip.rects();
if (vector.isEmpty())
return;
WebCore::FrameView* view = frame->view();
view->updateLayoutAndStyleIfNeededRecursive();
if (layers & ContentsLayer) {
QRect clipBoundingRect = clip.boundingRect();
coalesceRectsIfPossible(clipBoundingRect, vector);
for (int i = 0; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
QRect rect = clipRect.intersected(view->frameRect());
context.save();
painter->setClipRect(clipRect, Qt::IntersectClip);
int x = view->x();
int y = view->y();
int scrollX = view->scrollX();
int scrollY = view->scrollY();
context.translate(x, y);
rect.translate(-x, -y);
context.translate(-scrollX, -scrollY);
rect.translate(scrollX, scrollY);
context.clip(view->visibleContentRect());
view->paintContents(&context, rect);
context.restore();
}
#if USE(ACCELERATED_COMPOSITING)
renderCompositedLayers(&context, IntRect(clipBoundingRect));
#endif
}
renderFrameExtras(&context, layers, clip);
#if ENABLE(INSPECTOR)
if (frame->page()->inspectorController()->highlightedNode()) {
context.save();
frame->page()->inspectorController()->drawHighlight(context);
context.restore();
}
#endif
}
示例3: renderRelativeCoords
void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame::RenderLayer layer, const QRegion& clip)
{
if (!frame->view() || !frame->contentRenderer())
return;
QVector<QRect> vector = clip.rects();
if (vector.isEmpty())
return;
QPainter* painter = context->platformContext();
WebCore::FrameView* view = frame->view();
view->layoutIfNeededRecursive();
for (int i = 0; i < vector.size(); ++i) {
const QRect& clipRect = vector.at(i);
QRect intersectedRect = clipRect.intersected(view->frameRect());
painter->save();
painter->setClipRect(clipRect, Qt::IntersectClip);
int x = view->x();
int y = view->y();
if (layer & QWebFrame::ContentsLayer) {
context->save();
int scrollX = view->scrollX();
int scrollY = view->scrollY();
QRect rect = intersectedRect;
context->translate(x, y);
rect.translate(-x, -y);
context->translate(-scrollX, -scrollY);
rect.translate(scrollX, scrollY);
context->clip(view->visibleContentRect());
view->paintContents(context, rect);
context->restore();
}
if (layer & QWebFrame::ScrollBarLayer
&& !view->scrollbarsSuppressed()
&& (view->horizontalScrollbar() || view->verticalScrollbar())) {
context->save();
QRect rect = intersectedRect;
context->translate(x, y);
rect.translate(-x, -y);
view->paintScrollbars(context, rect);
context->restore();
}
#if ENABLE(PAN_SCROLLING)
if (layer & QWebFrame::PanIconLayer)
view->paintPanScrollIcon(context);
#endif
painter->restore();
}
}