Drawing with Inkscape – Part 159 By Mark Crutch Last month, I looked at the new Filter Gallery dialog. This month, I’m going to start by looking at the Extension Gallery dialog, which bears more than a passing resemblance to its filtery counterpart (Filter Gallery on the left, Extension Gallery on the right). This common design means they also share most of the same user experience oddities I described last time. For example, there are no ellipses after the extension names, to indicate those that open an additional dialog. Instead an ellipsis appears after the word ‘Run’ on the (oddly positioned) button at the bottom of the dialog, if you’ve selected such an extension. This isn’t a major problem, by any means, but I don’t really understand why some other badge or indicator couldn’t be used on the thumbnails themselves. The category list on the left corresponds to the top-level entries in the Extensions menu. As with the Filters Gallery, selecting one will restrict the displayed thumbnails as you would expect. Hiding the list using the toggle at the top-left switches back to show all the Extensions – which is a sensible design choice, in my view. But if you then toggle back again, you’re left with a view that shows all the extensions, but a list that has a single category selected. Once more, not a major problem, but a silly UX oversight nevertheless. It’s worth noting that, unlike the Filters menu, some of the entries in the Extensions menu also contain submenus. These are not reflected in the category list. For example, selecting the ‘Render’ category mixes all the extensions together, including those from the 3D, Barcodes, Gear, and Grid submenus. The actual location of the extension in the menu hierarchy is shown to the left of the Run button when you select a thumbnail, and also in a tooltip when you hover the mouse over one. Again, not a problem as such, but if the hierarchical position is important enough to display at all, then surely it’s important enough to reflect somewhere more obvious in the UI, perhaps by grouping thumbnails through the use of an additional badge or some color coding. Initially I thought that there was some use of badges to indicate categories, when I noticed the flash of triangles at the top-left of some of the thumbnails. This marker indicates that these are all part of the Color category, but there are no such markers used for any of the other categories. Some do have more of a common style within their group, such as the lined notepad design in the Text category. But even here the style isn’t applied consistently across all the extensions. In the Filter Gallery, the thumbnails roughly displayed what the effect of the filter might look like (subject to a few caveats, as I described last month). But for many extensions this isn’t really a practical option, so the thumbnails tend to be more abstract representations of their functionality. On the whole, I would say that the developers have done an excellent job in this respect… with one glaring exception. Of all the categories that could actually have been represented with thumbnails that show the effect of each extension, surely it’s the Raster section? This contains extremely filter-like tools to manipulate bitmap images, with extensions such as Blur, Oil Paint, and Swirl. And yet what we’ve ended up with is a whole category of arbitrary puzzle pieces – presumably the fallback design used when no specific thumbnail has been created. By comparison, these are the thumbnails from the Filter Gallery for the Blur, Oil Painting and Swirl filters. Surely we could have had something similar for the extensions? I’m also going to point out a couple of even more petty issues: Notice how the descender of the ‘g’ in the ‘Oil Painting’ label is cut off? That’s not bad cropping on my part when taking the screenshot – it’s how all the labels with descenders appear in both dialogs. Some of the labels are okay if you select a smaller thumbnail size, but even at the smallest option some are still cut off. And the second petty issue? On my AppImage version, at least, the top entry in the categories list says ‘All Effects’ rather than ‘All Extensions’. Does this hint at a Path Effects Gallery to come? Or is it just a typo? While I like the idea of the Extension Gallery, in practice I don’t think it’s as useful as the Filter Gallery. While the thumbnails for filters give a good idea of what each one does, those for extensions are often too abstract to have the same effect. To that end you still end up choosing your extension largely by its name, rather than the thumbnail image – at which point it’s actually less useful than the menu, due to its flattening of the submenus. It might work better if selecting a thumbnail displayed a good description of what the extension does. In some cases there is a description shown on the tooltip, and to the right of the ‘Run’ button when selected. But those descriptions are often so terse as to be useless, and when they are longer, the space next to the ‘Run’ button is far too small to hold them. See, for example, this screenshot with the ‘Level’ extension selected. Compare the description in the tooltip with the useless version next to the ‘Run’ button. Still, at least the tooltip shows the complete description, which still makes this a useful dialog, right? Except that the only extensions I’ve found with such descriptions are ‘Grid’, and those in the ‘Raster’ category. Yes, ironically, the extensions which could most benefit from a proper thumbnail are pretty much the only ones that have a description. And those same tooltips also appear when hovering over entries in the Extensions menu anyway. While we’re on the subject of extensions, let’s look at the ‘Clean up path’ extension that was added with the latest release, version 1.4.2. You can find it in the Extensions > Modify Path submenu, or you could, y’know, search for it in the Extensions Gallery. However you run it, you’ll need a path for it to operate on. I first tried with a traced bitmap image which had lots of erroneous speckles and gaps, resulting in a complex path with lots of nodes. I was quickly forced to change tack, however, to much simpler example paths that I created specifically to test this extension. Running the extension opens a dialog with four main options that can be toggled with checkboxes. Each of these has a single parameter, controlled by a slider and spinbox combination. The fourth also has a couple of additional parameters. I had hoped to demonstrate the usefulness of this extension, and how the additional controls make it better than Path > Simplify. But the truth is that I was unable to get this extension to work particularly well with my test images. The reason my screenshot shows the first and fourth checkboxes un-ticked is because enabling either of those usually led to Python error messages and the extension failing to do anything on my machine. On a few occasions Inkscape itself crashed entirely. Of the two options that did work, ‘Remove subpaths’ was the one best suited to my primary test image, and it did do the job well. My only complaint is that the scale of the slider wasn’t a great match for my image. At the lower end, it removed speckles and smaller dots, then quickly moved to affecting larger parts. But by the time I was less than a third of the way along the range, it had reached its maximum effect – meaning that all the ‘useful’ values were crammed into the first third of the control, leaving two thirds that effectively did nothing. This issue will be more or less pronounced depending on your specific path, but I think the underlying problem is that the cut-off lengths are measured in document units, per the note at the bottom of the dialog. Perhaps the option to use units that are proportional to the bounding box perimeter might be more useful, as that should result in ranges that have a similar effect regardless of the absolute size of the path object. The ‘Information’ tab of this extension has this to say about it: “Originally created to clean up paths for cutters/plotters by removing excessive nodes or small gaps.” With that description in mind, I set off to create the sort of paths that I thought might be better suited to this tool. With a drastically reduced example, I was able to get slightly more useful results. My main conclusion is that the safest way to use this extension is to stick to fairly simple paths and run it multiple times, selecting only one of the options for each pass. For example, the ‘Interpolate nodes’ option – which blew up every time on my complex bitmap trace – was happy to turn this straight segment path into a much smoother alternative. The ‘Remove subpaths’ option, which had actually worked well on my complex traced path, threw errors when used on a much simpler test path. Simplifying even further, however, it worked once more, removing the short segments from the red duplicate of the green path in this example. The ‘Close subpaths’ option felt like it needed another control, to determine exactly how to close the subpath. In this example, a copy of the green path did, indeed, have its subpaths closed. But where I had expected an extra line segment to be added, leaving the nodes un-moved, instead the two end nodes were replaced with a single node placed at the average position between them. Finally, the ‘Join end nodes’ option – which failed on the complex path – seemed quite happy to do its job on a much simpler one, healing the break between the two halves of the green path to create the orange version. Changing the angle at which the parts meet shows the difference between the two ‘Join subpaths by’ choices, with the red path being an example of interpolating nodes, and the blue being the result of the straight line option. The option to “Allow reversing direction of subpaths” allows some amount of control if the extension is joining the wrong parts together. Usually you should leave this enabled, but you can try disabling it in the event that there’s a problem with the join, such as the connecting lines crossing over when they shouldn’t. This extension certainly has potential, but is currently a little too unstable to recommend as the solution to cleaning up all your messy bitmap traces. By all means play around with it to see how it fares with your own images – just make sure to save frequently! Mark uses Inkscape to create comics for the web (http://www.peppertop.com/) as well as for print. You can follow him on Twitter for more comic and Inkscape content: @PeppertopComics