#pragma once
#include "SVGGeometryElement.h"
#include "SVGNames.h"
namespace WebCore {
class SVGLineElement final : public SVGGeometryElement {
WTF_MAKE_ISO_ALLOCATED(SVGLineElement);
public:
static Ref<SVGLineElement> create(const QualifiedName&, Document&);
const SVGLengthValue& x1() const { return m_x1->currentValue(); }
const SVGLengthValue& y1() const { return m_y1->currentValue(); }
const SVGLengthValue& x2() const { return m_x2->currentValue(); }
const SVGLengthValue& y2() const { return m_y2->currentValue(); }
SVGAnimatedLength& x1Animated() { return m_x1; }
SVGAnimatedLength& y1Animated() { return m_y1; }
SVGAnimatedLength& x2Animated() { return m_x2; }
SVGAnimatedLength& y2Animated() { return m_y2; }
private:
SVGLineElement(const QualifiedName&, Document&);
using PropertyRegistry = SVGPropertyOwnerRegistry<SVGLineElement, SVGGeometryElement>;
const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
void parseAttribute(const QualifiedName&, const AtomString&) final;
void svgAttributeChanged(const QualifiedName&) final;
bool isValid() const final { return SVGTests::isValid(); }
bool supportsMarkers() const final { return true; }
bool selfHasRelativeLengths() const final;
PropertyRegistry m_propertyRegistry { *this };
Ref<SVGAnimatedLength> m_x1 { SVGAnimatedLength::create(this, SVGLengthMode::Width) };
Ref<SVGAnimatedLength> m_y1 { SVGAnimatedLength::create(this, SVGLengthMode::Height) };
Ref<SVGAnimatedLength> m_x2 { SVGAnimatedLength::create(this, SVGLengthMode::Width) };
Ref<SVGAnimatedLength> m_y2 { SVGAnimatedLength::create(this, SVGLengthMode::Height) };
};
}