What is the difference between a path and an object?

5

0

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?

Kenny LJ

Posted 2015-07-13T19:18:00.617

Reputation: 531

Question was closed 2015-07-14T02:17:44.897

1@random: Why is this not a question about computer software? What is Inkscape if not a piece of computer software? – Kenny LJ – 2015-07-14T16:53:47.370

Maybe this chat conversation helps you.

– Wrzlprmft – 2015-07-14T21:37:12.300

This was closed as off-topic, but https://superuser.com/questions/640954/inkscape-rounding-corners-of-shapes is on the same subject as inkscape usage and was not marked as off-topic. https://stackoverflow.com/questions/tagged/inkscape in the stackoverflow site recommends they go into the Graphic Design exchange (https://graphicdesign.stackexchange.com/), so perhaps that needs to be done here for these.

– bgoodr – 2019-07-04T14:32:43.410

Answers

5

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.

Wrzlprmft

Posted 2015-07-13T19:18:00.617

Reputation: 2 673