本文整理汇总了C++中HitTestLocation::region方法的典型用法代码示例。如果您正苦于以下问题:C++ HitTestLocation::region方法的具体用法?C++ HitTestLocation::region怎么用?C++ HitTestLocation::region使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HitTestLocation
的用法示例。
在下文中一共展示了HitTestLocation::region方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nodeAtPoint
// Hit Testing
bool RenderRegion::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action)
{
if (!isValid())
return false;
LayoutPoint adjustedLocation = accumulatedOffset + location();
// Check our bounds next. For this purpose always assume that we can only be hit in the
// foreground phase (which is true for replaced elements like images).
// FIXME: Once we support overflow, we need to intersect with that and not with the bounds rect.
LayoutRect boundsRect = borderBoxRectInRegion(locationInContainer.region());
boundsRect.moveBy(adjustedLocation);
if (visibleToHitTestRequest(request) && action == HitTestForeground && locationInContainer.intersects(boundsRect)) {
// Check the contents of the RenderFlowThread.
if (m_flowThread->hitTestFlowThreadPortionInRegion(this, flowThreadPortionRect(), flowThreadPortionOverflowRect(), request, result, locationInContainer, LayoutPoint(adjustedLocation.x() + borderLeft() + paddingLeft(), adjustedLocation.y() + borderTop() + paddingTop())))
return true;
updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation));
if (!result.addNodeToRectBasedTestResult(generatingNode(), request, locationInContainer, boundsRect))
return true;
}
return false;
}