Point
A point is a pair of coordinates locating a position in a diagram. Points belong to the
concrete syntax: they describe where a shape is drawn, not
what a model element means.
Structure
- JSON type:
object - Properties (both required):
| Property | Type | Description |
|---|---|---|
x | integer | The horizontal coordinate; zero or greater. |
y | integer | The vertical coordinate; zero or greater. |
The origin (0, 0) is the diagram's top-left corner. From there x increases rightwards
and y increases downwards — the usual screen-coordinate convention, where the vertical axis
points down rather than up.
{ "x": 813, "y": 20 }
Where it is used
point is used by the shapes of the concrete syntax to place
and route them on a diagram:
| Property | Shape | Used by |
|---|---|---|
topLeft | point | a rectangular shape, anchoring its top-left corner |
points | point[] | a path, listing the vertices the line passes through in order |
note
point is one of the reusable datatypes; the others are
id, languageString,
resource, and pointInTime.