What is the difference between a path and an object? [closed]

Please explain to a beginner who is learning Inkscape what the difference is between a path and an object. For example, I draw a rectangle and it is an object. I can then convert it to a path, but it looks exactly the same as before. So what is the difference?


Inkscape features different type of objects, for example:

  • Rectangles
  • Circles
  • Texts
  • Paths

So a path is just a one type of object. Paths are special though, as all other types of objects can be converted to paths – they are the most universal representation of vector graphics. In some sense, all other types of objects only serve as a more intelligent and useful way to store information. Therefore, when you convert an object of another type to a path, you are not changing its appearance, but how it is handled.

Take, for example a rectangle. In Inkscape a rectangle is defined by its position, height, width, stroke style and fill style. More specifically, it looks like this (ignore the style line, it’s filled with stuff irrelevant for this question):

<rect
   style="color:#000000;fill:#2cabe1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.625;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
   id="rect3758"
   width="5"
   height="7"
   x="2"
   y="3"
   ry="0" />

When you convert it to a path, it’s instead defined by the positions of its corners and its stroke and fill style:

<path
   style="color:#000000;fill:#2cabe1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.625;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
   d="m 2,3 5,0 0,7 -5,0 z"
   id="rect3758" />

Now, why anybody would want to save something as a rectangle in the first place? Because rectangles have special properties that ease certain operations. For example, rounding the corners of a rectangle is straightforward. However, rounding the corners of arbitrary paths, in particular if they have non-right angles isn’t (see this question). Therefore, if you have a rectangle (the geometric shape) whose corner rounding you might want to modify somewhen in the future, it can be advantageous let it remain a rectangle (the Inkscape object type). On the other hand, you need to convert it to a path if, e.g., you want to move individual nodes or perform operations from path menu.