Back to Content

SVGLineElement

files/en-us/web/api/svglineelement/index.md

latest1.3 KB
Original Source

{{APIRef("SVG")}}

The SVGLineElement interface provides access to the properties of {{ SVGElement("line") }} elements, as well as methods to manipulate them.

{{InheritanceDiagram}}

Instance properties

This interface also inherits properties from its parent, {{domxref("SVGGeometryElement")}}.

  • {{domxref("SVGLineElement.x1")}} {{ReadOnlyInline}}
    • : Returns an {{domxref("SVGAnimatedLength")}} that corresponds to attribute {{SVGAttr("x1")}} on the given {{SVGElement("line")}} element.
  • {{domxref("SVGLineElement.y1")}} {{ReadOnlyInline}}
    • : Returns an {{domxref("SVGAnimatedLength")}} that corresponds to attribute {{SVGAttr("y1")}} on the given {{SVGElement("line")}} element.
  • {{domxref("SVGLineElement.x2")}} {{ReadOnlyInline}}
    • : Returns an {{domxref("SVGAnimatedLength")}} that corresponds to attribute {{SVGAttr("x2")}} on the given {{SVGElement("line")}} element.
  • {{domxref("SVGLineElement.y2")}} {{ReadOnlyInline}}
    • : Returns an {{domxref("SVGAnimatedLength")}} that corresponds to attribute {{SVGAttr("y2")}} on the given {{SVGElement("line")}} element.

Instance methods

Inherits methods from its parent interface, {{domxref("SVGGeometryElement")}}.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{SVGElement("line")}} SVG Element