Outils pour utilisateurs

Outils du site


issue159:inkscape

Ceci est une ancienne révision du document !


This month I’ll be continuing to look at the new view features in Inkscape v1.0, beginning with an addition to the View > Display Mode menu. If you’re a long-time reader of this column, then not only do you deserve some kind of award (perhaps an Inkscape-drawn certificate), but you’ll also be familiar with the “Outline” display mode.

Known informally as the “where’s my invisible stuff” mode, this feature renders every element as a simple outline, regardless of its usual fill and stroke settings. It’s invaluable for those times when you’ve created an otherwise invisible object – whether by accident or intent (there are some good reasons why you might want to). Typically, this is an early mistake by new users who inadvertently clear both the fill and stroke, make the colors transparent, reduce the opacity on the whole object, or go a bit crazy with the blur slider. In these cases, View > Display Mode > Outline lets you see, and select, your invisible object, whether to delete it or try to wrangle it back into a visible state.

The new view mode is related, but different. Whereas Outline mode renders everything as outlines, losing patterns, fills and strokes in the process, the new “Visible Hairlines” feature just makes really thin strokes a bit thicker, but otherwise displays most other objects and properties the same as usual. An example will probably help to explain, so take a look at these five stars:

“Five stars?” you say. “But I can only see two. Maybe three or four if I zoom right in and squint a bit.”

There are, indeed, five stars. None of them are hidden. None have any transparency or reduced opacity applied. None are filtered. Yet some are definitely easier to see than others – and one is not visible at all. What’s going on here? Perhaps if I describe each star you might realise what’s happening: Top left: 1px black stroke. Top right: 64px black stroke. Bottom left: 64px light gray stroke. Bottom middle: 0.1px black stroke. Bottom right: Red fill.

The visible stars on the right are easy enough to explain – one has a thick stroke, one has a fill. The bottom left also has a thick stroke, but in a light color that makes it hard to see. The top left is possibly just about visible: these are large stars, and the page is zoomed out, so that a 1px stroke is just on the edge of Inkscape’s display capabilities. If you go much thinner – as I have done with the 0.1px stroke on the remaining star – Inkscape just doesn’t render it at all.

Let’s see how these look in Outline mode.

Here we see the problem with Outline view. Yes, we can now see all the stars, which is great for finding invisible objects. But they all look the same, regardless of their original styles.

Compare this with View > Display Mode > Visible Hairlines:

Although it may not be clear in the magazine, the top left star is ever so slightly thicker. Our previously invisible star is also rendered with the same thickness. The two stars on the right just appear as they usually would – as does the star at the bottom left, which is still difficult to see.

This view mode is intended to help if you are designing an image for use with a laser cutter or similar device. These machines often require paths to have a purely nominal thickness – 0.1mm is a typical value – which can easily result in them disappearing from view when you zoom out. By switching to Visible Hairlines mode, you ensure that Inkscape will always display strokes at a thickness that is enough to keep them visible. It doesn’t change the actual widths in the SVG file, so your laser cutter won’t complain, but does mean that objects no longer vanish while you work.

Any stroke that is already above the minimal limit will be rendered as usual. That’s why the thicker strokes on the top right and bottom left stars are unaffected. As you can see with the bottom left, however, that can still lead to barely visible shapes, so Outline view still has its place. As the bottom right star shows, fills and other properties are also rendered as normal in this view. Filters don’t fare very well, but as they are purely visual effects that don’t alter the geometric information that a laser cutter might use, they’re not generally used in the sort of situations that this mode is intended to address.

Most users won’t need this mode. If you just want to find an invisible object, Outline mode is still your best bet. But if you do have to work with exceptionally thin strokes, and find they vanish when you zoom out, this mode is just the thing for you.

If you are on the hunt for invisible objects, or those hidden behind other items, there are a couple of other new features hanging around on the View menu: View > Split View Mode and View > XRay Mode. They’re a little like dynamic versions of the Outline view mode, giving you the best of both worlds – both outline and full display, at the same time. They should also both be on the Display Mode submenu, in my opinion, but probably live on the main menu to make them more discoverable. Let’s look at Split View Mode first.

This image is made up of four stars, identical except for their size. I created the smallest one first, and set its opacity to 25%. Then I duplicated it and resized to create the second one; then duplicated and resized the second to make the third; same for the third to the fourth.

My question to you is this: what’s the easiest way to select the smallest star? Due to the order in which I created them, it’s at the bottom of the z-stack, so a simple click won’t do the job. Here are some methods that would work in this particular case: • Careful rubber band selection. • Hold Alt (or Super-Alt on most Linux boxes) and repeatedly click in the same spot to select below the current object. • Reorder the stack manually before selecting. • Reorder the stack using Extensions > Arrange > Restack before selecting. • Switch to Outline view mode, then select.

The last option is arguably the most practical. It doesn’t require you to change the arrangement of items in your drawing, and is probably less likely than the others to result in the wrong thing being selected. But it’s a pain to turn Outline mode on and off via the menu, and you may not use it often enough to warrant learning more keyboard shortcuts.

What would be really handy is a way to get a temporary outline view of the drawing, but then switch back to normal view simply and intuitively. With Split View Mode that’s almost what we’ve got. Almost.

You can activate the new mode, via the View > Split View Mode menu. The default keyboard shortcut is Ctrl-6, but this is 6 on the main keyboard, not the numeric keypad. I find this a little odd, given that the default shortcut for cycling through the display modes uses Ctrl with 5 on the numeric keypad. However you trigger it, enabling this mode will immediately split the workspace in two, with the left side showing the normal view of your document, and the right side showing the outline view.

A large circular handle at the middle of the screen can be dragged to move the split point, allowing more or less of the view to be displayed in outline mode. Four triangles within the control let you switch the orientation of the split between horizontal and vertical, and determine which side of the split should show the outline view. Both sides of the display work as normal, so you are free to select items in the outline view then manipulate them in the normal view, or vice versa. Clicks and drags on the splitter control are not propagated through to the objects below so you can, for example, make a selection in outline view then adjust the split to give you more of a normal view without the objects becoming deselected as you do so.

On the surface, this looks like a great addition for working with complex documents. Just enable Split View Mode then slide the splitter to one side to give you a normal view most of the time, swinging it back into play for tricky selections, before swiping it away to the side again, ready for redeployment in an instant. Except it doesn’t work like that.

If you drag the handle too close to the edge of the workspace, this mode gets deactivated, requiring another trip to the View menu, or hitting the keyboard shortcut, to switch it on again. But there’s no visual indication of where “too close” begins. And it’s deactivated even if you’re still in the process of dragging, without the courtesy of at least waiting for you to release the mouse button! The result is that it’s too tricky to leave this mode enabled at all times, just swiping the splitter in and out of view as needed, because you’re bound to swipe it too far at some point and turn the feature off.

Worse still, moving the big handle towards any edge has the same effect, regardless of the splitter orientation. With a vertical splitter, separating the two halves to the left and right, you might be tempted to move the handle up or down to get it out of the way of your content. But even though you’re not moving the splitter itself, drag it a pixel too high or low and the whole mode turns off, requiring you to start at the menu again.

This mode also doesn’t store the split state between invocations. Every time you enable it you’ll be put directly into the same 50/50 view with the outline on the right. It doesn’t matter if you previously switched to 70/30 with the outline at the bottom, or any other combination. Once this mode is turned off, and then back on again, it drops you straight to the default. And given how easy it is to accidentally turn it off, it makes working with this mode more of a pain than a pleasure. It does make for nice screenshots when demonstrating the density of objects in a complex drawing though.

View > Xray Mode is a closely related, but slightly different feature. The keyboard shortcut for this is Alt-6, by default, but once again this has to be the 6 on the top row of keys, not on the numeric keypad. Switching this on enables outline view in a circle immediately surrounding the mouse pointer. Like an X-ray, it cuts through the body of your drawing to show you the bones that support it. But it’s more like a tightly controlled “X-ray beam” from a pulp comic book than the large format plates that are routinely hung from wall-mounted light boxes in medical dramas.

As with Split View Mode, you can still make selections and perform other tasks with this mode activated. There’s no way to change the size or shape of the beam, and no way to ‘leave it’ at a particular place while you use the mouse elsewhere. To my mind this mode is a fun distraction, but ultimately not very useful for day-to-day work.

If you struggle to select objects in busy drawings, then it might be worth changing the keyboard shortcut to make it easier to toggle on and off. What would be nice is a ‘hold-to-activate’ key, like the ‘Q’ key for the quick-zoom function, which would allow you to press and hold a key for long enough to make a tricky selection, but would return you to the normal view as soon as you release it. It would certainly make for a better use of the ‘X’ key than as a shortcut for the largely useless 3D box tool. I have, of course, filed a feature request for this – as well as one for improvements to the Split View mode.

That’s it for the new view features in v1.0. Next month will be the 100th article in this series, so I’ll be celebrating this milestone by… continuing to bring you details of some of the other new features in the latest Inkscape release.

issue159/inkscape.1596383040.txt.gz · Dernière modification : 2020/08/02 17:44 de auntiee