# `<line>`

[Canonical page](https://nothing.graphics/docs/format/reference/line) · [Page source on GitHub](https://github.com/gridaco/nothing/blob/main/ncf/docs/reference/line.md)

Connect two authored endpoints with a straight open contour.



<!-- Generated by ncf/tools/reference/generate.mjs. -->

A line starts at (x1, y1) and ends at (x2, y2). Use a stroke to paint the resulting segment.

## Syntax [#syntax]

### Set the endpoints of a rule [#set-the-endpoints-of-a-rule]

The sibling stroke paints horizontally at y = 36 from x = 112 to 296. The rule paints over the neighboring card, including its letter-shaped holes. With PT Serif Bold bound, (148, 36) is white.

```xml
<line x1="112" y1="36" x2="296" y2="36"/>
```

[Complete .nothing source](https://github.com/gridaco/nothing/blob/main/ncf/conformance/cutout.nothing) · [Sample checks](https://github.com/gridaco/nothing/blob/main/ncf/conformance/README.md#published-reference-examples)

## Usage context [#usage-context]

Allowed parents are [`<shape>`](https://nothing.graphics/docs/format/reference/shape).

Inherits from [Geometry](https://nothing.graphics/docs/format/reference/geometry).

## Attributes [#attributes]

[Property animation](https://nothing.graphics/docs/format/spec/animation#property-types-and-exceptions)

### `x1` [#x1]

**Value** local units · **Required** · **Keys** Scalar

Horizontal coordinate of the first endpoint.

### `y1` [#y1]

**Value** local units · **Required** · **Keys** Scalar

Vertical coordinate of the first endpoint.

### `x2` [#x2]

**Value** local units · **Required** · **Keys** Scalar

Horizontal coordinate of the second endpoint.

### `y2` [#y2]

**Value** local units · **Required** · **Keys** Scalar

Vertical coordinate of the second endpoint.

## Children [#children]

| Elements                                                              | Cardinality  | Declared by | Role and source order                                                                                                                                                                                                |
| --------------------------------------------------------------------- | ------------ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`<animate>`](https://nothing.graphics/docs/format/reference/animate) | Zero or more | Animation   | A track targets one keyable property on this owner. For equal first-key times, the later track in document order wins. [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation) |

## Specifications [#specifications]

* [Shapes and geometry](https://nothing.graphics/docs/format/spec/graphics#shapes)
* [Evaluating animation tracks](https://nothing.graphics/docs/format/spec/animation#evaluation)
