Path SVGStyledTransformableElement::toClipPath() const { Path pathData = toPathData(); // FIXME: How do we know the element has done a layout? pathData.transform(animatedLocalTransform()); return pathData; }
void SVGUseElement::toClipPath(Path& path) const { ASSERT(path.isEmpty()); Node* n = m_targetElementInstance ? m_targetElementInstance->shadowTreeElement() : 0; if (!n) return; if (n->isSVGElement() && static_cast<SVGElement*>(n)->isStyledTransformable()) { if (!isDirectReference(n)) // Spec: Indirect references are an error (14.3.5) document()->accessSVGExtensions()->reportError("Not allowed to use indirect reference in <clip-path>"); else { static_cast<SVGStyledTransformableElement*>(n)->toClipPath(path); path.translate(FloatSize(x().value(this), y().value(this))); path.transform(animatedLocalTransform()); } } }
void SVGUseElement::toClipPath(Path& path) { ASSERT(path.isEmpty()); Node* n = m_targetElementInstance ? m_targetElementInstance->shadowTreeElement() : 0; if (!n) return; if (n->isSVGElement() && toSVGElement(*n).isSVGGraphicsElement()) { if (!isDirectReference(toSVGElement(*n))) { // Spec: Indirect references are an error (14.3.5) document().accessSVGExtensions()->reportError("Not allowed to use indirect reference in <clip-path>"); } else { toSVGGraphicsElement(*n).toClipPath(path); // FIXME: Avoid manual resolution of x/y here. Its potentially harmful. SVGLengthContext lengthContext(this); path.translate(FloatSize(x().value(lengthContext), y().value(lengthContext))); path.transform(animatedLocalTransform()); } } }
void SVGGraphicsElement::toClipPath(Path& path) { updatePathFromGraphicsElement(this, path); // FIXME: How do we know the element has done a layout? path.transform(animatedLocalTransform()); }
void SVGStyledTransformableElement::toClipPath(Path& path) const { toPathData(path); // FIXME: How do we know the element has done a layout? path.transform(animatedLocalTransform()); }
AffineTransform SVGTransformable::getScreenCTM(const SVGElement* element) const { AffineTransform ctm = SVGLocatable::getScreenCTM(element); return animatedLocalTransform() * ctm; }
TransformationMatrix SVGTransformable::getScreenCTM(const SVGElement* element) const { TransformationMatrix ctm = SVGLocatable::getScreenCTM(element); return animatedLocalTransform() * ctm; }