Outils pour utilisateurs

Outils du site


issue176:inkscape

Ceci est une ancienne révision du document !


This month, we’re moving on from the Selectors and CSS dialog, to the last of the big changes that were made with the release of the 1.0 and 1.1 series of Inkscape versions: Live Path Effects (LPEs).

LPEs themselves are not new, of course. They’ve been a staple of Inkscape since version 0.46, way back in 2008, but have seen considerable improvements with every release. With 1.0, the user interface was radically overhauled, so, this month, I’ll be concentrating on those changes. The following months will then take a deeper dive into the new effects that arrived with 1.0 and 1.1.

If you’re new to LPEs, you may want to take a look at parts 42 – 47 of this series for a general introduction, and the effects that were available in v0.48; then parts 65 – 69 for the effects that were added with v0.91 and v0.92.

One thing that hasn’t changed much with the new releases is the initial LPE dialog, opened via Path > Path Effects… (or Ctrl-Shift-7). The content of this will remain disabled until a path is selected, at which point you’re presented with a rather empty dialog. Just about all you can do at this point is to click the “+” button at the bottom in order to add your first LPE to the effects chain. On 0.92, the available LPEs are displayed in a list, like this:

It does the job, but it is somewhat utilitarian. As the total number of LPEs grew, it became clear that something more functional was required. Version 1.0 takes that requirement and hits it out of the ballpark, with a vastly more powerful dialog (see above).

Immediately you can see the biggest change is the switch from a simple list of titles, to a grid of icons that represent what each LPE does. This alone is a huge improvement, as it’s generally much easier to find the effect you’re looking for with the aid of the icons rather than by title alone. If you really prefer a list view then you can select this using the buttons at the top of the dialog. These allow you to choose between two densities of grid, or a list view that is still more useful than the old one, as it also includes a smaller version of the icon plus some descriptive text (see below).

You won’t be at all surprised to hear that the search box at the top of the dialog can be used to filter the list of effects based on a simple substring search that looks at both the effect name and the description. This applies even in the grid view, when the descriptions aren’t so obviously visible.

In the list view, you’ll notice that each entry has a small star between the icon and the effect name. Clicking this will mark (or un-mark) that effect as a “favorite”. The visible list can then be restricted to show only the favorites using the star icon in the toolbar. It’s important to note that, when showing just the favorites, any text typed into the search box will be tested only against favorites, not against the other hidden effects.

It’s also important to note that the clickable areas on each row are a little non-standard in some respects. Hovering over the star doesn’t change the cursor to indicate it is clickable, and doesn’t produce a tooltip to that effect either. Clicking it does toggle the state, indicated by a filled or open star, but has no other side-effects. The rest of the row, on the other hand – whether that’s the icon, title or description – changes the cursor to indicate that it is clickable. If you do click the mouse button, it will add the effect to the main LPE dialog and immediately close this one. Take care, therefore, when trying to (un)mark a favorite, as a slight mis-click could easily lead to the effect being added to the effect chain by mistake.

Similar care needs to be taken in the grid view. Clicking on an effect’s icon or title will, again, immediately add it to the effect chain and close this dialog. Below each entry, however, is a small downward-facing chevron: clicking this does not add the effect to the chain, but rather selects it and displays three icons, as shown in this before/after screenshot:

The three icons all behave quite differently. Hovering over the first will display a pop-up showing the icon, title and description. This is the only way to view the description in grid mode – unfortunately the developers haven’t exposed them via tooltips on the main icons or titles. There is no change in the cursor when hovering over this icon, but clicking it will add the effect to the chain and close the dialog.

The second, star-shaped icon toggles the favorite status of the effect, as you might expect. As with the list view, there’s no change of cursor, nor a tooltip to describe this behaviour, and clicking here will not add the effect to the main dialog.

Finally, the third icon (a tick in a circle) seems a little redundant. It appears to be there as a means for you to confirm your selection, causing the effect to be added to the chain and the dialog to be closed. Given that clicking almost every other part of this widget has the same effect, however, it seems unnecessary. It is worth noting, however, that the clickable area doesn’t cover the entire size of the colored background: the large, empty spaces to the left and right are not clickable (and do not change the mouse cursor) which I find a little misleading, but not a huge problem in practice. As I’m being picky about the UI, though, I do think the developers should nudge the favorites toggle up a couple of pixels. I’m sure it’s perfectly aligned numerically, but the difference in visual weight between a circle and a star does make it look like it’s sitting a little low compared to its siblings.

The final part of the UI for this dialog is the slide switch at the right of the toolbar, labelled “Show Experimental”. Clicking on the switch itself (the label isn’t clickable – a classic UI mistake) reveals or hides any LPEs which are included in your Inkscape release but still considered experimental by the developers. Unfortunately, these all get the same “cherry bomb” icon, which indicates that they are risky to use but doesn’t provide a quick indication of what each effect actually does, as a normal icon would. I would much rather see them distinguished by having the cherry bomb as an additional tag or emblem attached to the main icon.

The exact list of additional effects that are exposed by this switch will vary depending on your Inkscape release, but could be substantial. On my 1.1.1 version, for example, an additional eight effects become available, which is quite a percentage of the 49 that are present in total. I’ve colored them red on the screenshot above to make them stand out a little, but Inkscape itself presents them in the same color as the other icons. The effects appear in alphabetical order, with no means to sort them; I would prefer an option to group all the experimental effects at the end of the list, perhaps with a divider, so that it becomes more practical to leave this option enabled without them cluttering up the list of “safe” effects.

As you might expect, using any of these experimental effects is entirely at your own risk. Don’t be surprised if doing so results in crashes, and even if they appear to work fine there’s no guarantee that your files will continue to be compatible with future versions of Inkscape. For this reason I don’t intend to delve into these in any detail until they are promoted to supported effects in future – though I won’t rule out a quick overview if I run out of other topics to write about before the next release!

One other thing to notice from the previous screenshot is that there are two effects which are disabled: “Power clip” and “Power mask”. These require that there’s already a clip (or mask) on the path that you’re adding the effect to. When a suitably clipped/masked element is selected, these will also be enabled alongside all the other LPEs.

The UI changes aren’t limited to the “Add Effect” dialog. Once an effect has been added to the chain, the corresponding parameters section of the main LPE dialog will also show some additional options. This can be seen with the Ruler LPE, for example, as shown in this comparison between v0.92 and v1.1.1 (below).

The height difference between the dialogs can be explained by the “tab” at the top of the panel, which can be used to dock it in v1.x, combined with the generally larger input fields used throughout the UI in newer releases. The parameter rows themselves have also changed from right-aligned to left-aligned. Of the two, my personal preference is for the older style where at least the +/- buttons are vertically aligned. In reality, however, I don’t really like either approach. A better option, in my opinion, would be a more tabular style in which the labels fall neatly into one column and the input fields into another, as in the following mock-up. I am aware, however, that this may not be possible to achieve with the current widget toolkit, so consider this wishful thinking rather than a serious proposal.

One new feature that is common to all the LPE parameter screens is the “Set default parameters'' section at the bottom of the dialog. Expanding this will display a list of Set (or Update) and Unset buttons, one pair for each parameter the LPE offers. These allow you to set the default values that will be used when the LPE is first added to a path, by entering the value into the parameter field and clicking the corresponding Set button. The button label will then change to Update, allowing you to modify the stored default by changing the value in the field before clicking the button. The Unset button will clear your saved preference and revert to using the LPE’s own default values.

For a little more information about any parameter, hover the mouse over the lightbulb icon at the left of the row: a pop-up will display the name of the field, any tooltip associated with it, and the default value – or the value override, if you’ve set one. This can be useful for confirming the value that is currently being used, but it would be nice if it still showed the system default when a custom value is set, to give the user a bit more information about what will happen if they click the Unset button.

As well as this new set of buttons, you’ll find that many of the long-standing LPEs have gained a few additional parameters. I don’t intend to revisit these at this time, as the changes are generally small enough not to present either a problem or a significant opportunity. From next month, however, I will start to take a detailed look at the completely new LPEs that have been added.

issue176/inkscape.1641130058.txt.gz · Dernière modification : 2022/01/02 14:27 de auntiee