Go to previous pageGo to next page

1.7.2. Creating any Path

The following statements are needed to create any path element (they vary depending on the used program language):

  • move_to (x, y)
  • line_to (x, y)
  • curve_to (x0, y0, x1, y1, x2, y2)
  • close_path ()

sets the starting point of a shape or a part of a multi-part shape.
draws a line from the current point to the new defined point.
draws a cubic Bézier curve from the current point, using the listed control points.
closes the path by drawing a line to the first point of the path.

Example of C-Code

Example of codeExample of code How it looks on the screenHow it looks on the screen
important

The direction of a path often plays an important role e.g. when transforming a path into an arrow some software (e.g. Adobe Illustrator) ask you if the arrowhead has the be added at the end or at the beginning of the path. Therefore be aware of this aspect when working with paths.



Go to previous page
Go to next page