本文整理汇总了C++中SVGClipPathElement::animatedLocalTransform方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGClipPathElement::animatedLocalTransform方法的具体用法?C++ SVGClipPathElement::animatedLocalTransform怎么用?C++ SVGClipPathElement::animatedLocalTransform使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGClipPathElement
的用法示例。
在下文中一共展示了SVGClipPathElement::animatedLocalTransform方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hitTestClipContent
bool RenderSVGResourceClipper::hitTestClipContent(const FloatRect& objectBoundingBox, const FloatPoint& nodeAtPoint)
{
FloatPoint point = nodeAtPoint;
if (!SVGRenderSupport::pointInClippingArea(this, point))
return false;
SVGClipPathElement* clipPathElement = static_cast<SVGClipPathElement*>(node());
if (clipPathElement->clipPathUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
AffineTransform transform;
transform.translate(objectBoundingBox.x(), objectBoundingBox.y());
transform.scaleNonUniform(objectBoundingBox.width(), objectBoundingBox.height());
point = transform.inverse().mapPoint(point);
}
point = clipPathElement->animatedLocalTransform().inverse().mapPoint(point);
for (Node* childNode = node()->firstChild(); childNode; childNode = childNode->nextSibling()) {
RenderObject* renderer = childNode->renderer();
if (!childNode->isSVGElement() || !toSVGElement(childNode)->isSVGStyledElement() || !renderer)
continue;
if (!renderer->isSVGShape() && !renderer->isSVGText() && !childNode->hasTagName(SVGNames::useTag))
continue;
IntPoint hitPoint;
HitTestResult result(hitPoint);
if (renderer->nodeAtFloatPoint(HitTestRequest(HitTestRequest::SVGClipContent | HitTestRequest::DisallowShadowContent), result, point, HitTestForeground))
return true;
}
return false;
}