本文整理汇总了C++中LayoutBoxModelObject::frame方法的典型用法代码示例。如果您正苦于以下问题:C++ LayoutBoxModelObject::frame方法的具体用法?C++ LayoutBoxModelObject::frame怎么用?C++ LayoutBoxModelObject::frame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayoutBoxModelObject
的用法示例。
在下文中一共展示了LayoutBoxModelObject::frame方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: convertTargetSpaceQuadToCompositedLayer
static void convertTargetSpaceQuadToCompositedLayer(const FloatQuad& targetSpaceQuad, LayoutObject* targetLayoutObject, const LayoutBoxModelObject& paintInvalidationContainer, FloatQuad& compositedSpaceQuad)
{
DCHECK(targetLayoutObject);
for (unsigned i = 0; i < 4; ++i) {
IntPoint point;
switch (i) {
case 0:
point = roundedIntPoint(targetSpaceQuad.p1());
break;
case 1:
point = roundedIntPoint(targetSpaceQuad.p2());
break;
case 2:
point = roundedIntPoint(targetSpaceQuad.p3());
break;
case 3:
point = roundedIntPoint(targetSpaceQuad.p4());
break;
}
// FIXME: this does not need to be absolute, just in the paint invalidation container's space.
point = targetLayoutObject->frame()->view()->contentsToRootFrame(point);
point = paintInvalidationContainer.frame()->view()->rootFrameToContents(point);
FloatPoint floatPoint = paintInvalidationContainer.absoluteToLocal(point, UseTransforms);
PaintLayer::mapPointInPaintInvalidationContainerToBacking(paintInvalidationContainer, floatPoint);
switch (i) {
case 0:
compositedSpaceQuad.setP1(floatPoint);
break;
case 1:
compositedSpaceQuad.setP2(floatPoint);
break;
case 2:
compositedSpaceQuad.setP3(floatPoint);
break;
case 3:
compositedSpaceQuad.setP4(floatPoint);
break;
}
}
}