本文整理汇总了C++中DrawingAreaProxy::setVisibleContentsRect方法的典型用法代码示例。如果您正苦于以下问题:C++ DrawingAreaProxy::setVisibleContentsRect方法的具体用法?C++ DrawingAreaProxy::setVisibleContentsRect怎么用?C++ DrawingAreaProxy::setVisibleContentsRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DrawingAreaProxy
的用法示例。
在下文中一共展示了DrawingAreaProxy::setVisibleContentsRect方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: didChangeContentPosition
void WebViewNix::didChangeContentPosition(const WebCore::FloatPoint& trajectoryVector)
{
DrawingAreaProxy* drawingArea = page()->drawingArea();
if (!drawingArea)
return;
FloatRect visibleContentsRect(contentPosition(), visibleContentsSize());
visibleContentsRect.intersect(FloatRect(FloatPoint(), contentsSize()));
drawingArea->setVisibleContentsRect(visibleContentsRect, trajectoryVector);
}
示例2: syncVisibleContents
void PageViewportController::syncVisibleContents(const FloatPoint& trajectoryVector)
{
DrawingAreaProxy* drawingArea = m_webPageProxy->drawingArea();
if (!drawingArea || m_viewportSize.isEmpty() || m_contentsSize.isEmpty())
return;
FloatRect visibleContentsRect(clampViewportToContents(m_viewportPos, m_effectiveScale), viewportSizeInContentsCoordinates());
visibleContentsRect.intersect(FloatRect(FloatPoint::zero(), m_contentsSize));
drawingArea->setVisibleContentsRect(visibleContentsRect, m_effectiveScale, trajectoryVector);
m_client->didChangeVisibleContents();
}
示例3: informVisibleContentChange
void QtViewportHandler::informVisibleContentChange(const QPointF& trajectoryVector)
{
DrawingAreaProxy* drawingArea = m_webPageProxy->drawingArea();
if (!drawingArea)
return;
if (m_lastVisibleContentsRect == visibleContentsRect())
return;
qreal scale = m_pageItem->contentsScale();
if (scale != m_lastCommittedScale)
emit m_viewportItem->experimental()->test()->contentsScaleCommitted();
m_lastCommittedScale = scale;
m_lastVisibleContentsRect = visibleContentsRect();
drawingArea->setVisibleContentsRect(visibleContentsRect(), scale, trajectoryVector, m_viewportItem->contentPos());
// Ensure that updatePaintNode is always called before painting.
m_pageItem->update();
}