Line Drawing using PathSegment and PathFigure

<span =“Apple-tab-span” style=“white-space:pre”> I am evaluating GoJs and have some doubts in PathSegment and PathFigure. Could you please provide me some examples of drawing lines using PathSegment and PathFigure.

Thanks in advance.

Normally when you want to import geometries (i.e. “shapes”) from other software you would use geometry path strings. It is also convenient to store/load such strings in your model data.

You would use the Geometry/PathFigure/PathSegment classes when you want to create geometries dynamically. For example, look at the implementation of the Polygon Drawing and Freehand Drawing samples. Also, the Tapered Links sample computes geometries automatically.