This source file includes following definitions.
- create
- animatedLocalTransform
- createRenderer
#include "config.h"
#include "core/svg/SVGTextElement.h"
#include "core/rendering/svg/RenderSVGResource.h"
#include "core/rendering/svg/RenderSVGText.h"
#include "core/svg/SVGElementInstance.h"
namespace WebCore {
inline SVGTextElement::SVGTextElement(Document& doc)
: SVGTextPositioningElement(SVGNames::textTag, doc)
{
ScriptWrappable::init(this);
}
PassRefPtr<SVGTextElement> SVGTextElement::create(Document& document)
{
return adoptRef(new SVGTextElement(document));
}
AffineTransform SVGTextElement::animatedLocalTransform() const
{
AffineTransform matrix;
RenderStyle* style = renderer() ? renderer()->style() : 0;
if (style && style->hasTransform()) {
TransformationMatrix t;
style->applyTransform(t, IntSize(0, 0), RenderStyle::ExcludeTransformOrigin);
matrix = t.toAffineTransform();
} else {
transform()->currentValue()->concatenate(matrix);
}
const AffineTransform* transform = const_cast<SVGTextElement*>(this)->supplementalTransform();
if (transform)
return *transform * matrix;
return matrix;
}
RenderObject* SVGTextElement::createRenderer(RenderStyle*)
{
return new RenderSVGText(this);
}
}