SVGTransformList.h [plain text]
#pragma once
#include "DOMMatrix2DInit.h"
#include "SVGTransform.h"
#include "SVGTransformable.h"
#include "SVGValuePropertyList.h"
namespace WebCore {
class SVGTransformList final : public SVGValuePropertyList<SVGTransform> {
friend class SVGViewSpec;
using Base = SVGValuePropertyList<SVGTransform>;
using Base::Base;
public:
static Ref<SVGTransformList> create()
{
return adoptRef(*new SVGTransformList());
}
static Ref<SVGTransformList> create(SVGPropertyOwner* owner, SVGPropertyAccess access)
{
return adoptRef(*new SVGTransformList(owner, access));
}
static Ref<SVGTransformList> create(const SVGTransformList& other, SVGPropertyAccess access)
{
return adoptRef(*new SVGTransformList(other, access));
}
ExceptionOr<Ref<SVGTransform>> createSVGTransformFromMatrix(DOMMatrix2DInit&& matrixInit)
{
auto svgTransform = SVGTransform::create();
svgTransform->setMatrix(WTFMove(matrixInit));
return svgTransform;
}
ExceptionOr<RefPtr<SVGTransform>> consolidate();
AffineTransform concatenate() const;
void parse(StringView);
String valueAsString() const override;
private:
template<typename CharacterType> bool parseGeneric(StringParsingBuffer<CharacterType>&);
bool parse(StringParsingBuffer<LChar>&);
bool parse(StringParsingBuffer<UChar>&);
};
}