本文整理汇总了C++中RenderElement::localToParentTransform方法的典型用法代码示例。如果您正苦于以下问题:C++ RenderElement::localToParentTransform方法的具体用法?C++ RenderElement::localToParentTransform怎么用?C++ RenderElement::localToParentTransform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RenderElement
的用法示例。
在下文中一共展示了RenderElement::localToParentTransform方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: computeFloatRectForRepaint
void SVGRenderSupport::computeFloatRectForRepaint(const RenderElement& renderer, const RenderLayerModelObject* repaintContainer, FloatRect& repaintRect, bool fixed)
{
const SVGRenderStyle& svgStyle = renderer.style().svgStyle();
if (const ShadowData* shadow = svgStyle.shadow())
shadow->adjustRectForShadow(repaintRect);
repaintRect.inflate(renderer.style().outlineWidth());
// Translate to coords in our parent renderer, and then call computeFloatRectForRepaint() on our parent.
repaintRect = renderer.localToParentTransform().mapRect(repaintRect);
renderer.parent()->computeFloatRectForRepaint(repaintContainer, repaintRect, fixed);
}
示例2: mapLocalToContainer
void SVGRenderSupport::mapLocalToContainer(const RenderElement& renderer, const RenderLayerModelObject* repaintContainer, TransformState& transformState, bool* wasFixed)
{
transformState.applyTransform(renderer.localToParentTransform());
ASSERT(renderer.parent());
auto& parent = *renderer.parent();
// At the SVG/HTML boundary (aka RenderSVGRoot), we apply the localToBorderBoxTransform
// to map an element from SVG viewport coordinates to CSS box coordinates.
// RenderSVGRoot's mapLocalToContainer method expects CSS box coordinates.
if (parent.isSVGRoot())
transformState.applyTransform(toRenderSVGRoot(parent).localToBorderBoxTransform());
MapCoordinatesFlags mode = UseTransforms;
parent.mapLocalToContainer(repaintContainer, transformState, mode, wasFixed);
}