Outils pour utilisateurs

Outils du site


issue201:inkscape

Ceci est une ancienne révision du document !


First this time a little update on Inkscape versions. I mentioned a couple of months ago that a release of Inkscape 1.3.1 was expected, which adds the Text > Text to Glyphs feature. This was released on schedule, and also adds the welcome addition of a new entry in the Snap popup which allows you to turn off snapping to grid lines while still allowing snapping to grid intersections. On top of that there were a lot of bugfixes – way too many to document here, so take a look at the release notes if you’re interested: https://wiki.inkscape.org/wiki/Release_notes/1.3.1 But before you rush off to download 1.3.1 you should be aware that it also introduced some bugs that can lead to data loss or corrupted files. As a result, version 1.3.2 was quickly released to address these issues, and this version is a strongly recommended update for anyone using 1.3. If you’ve already downloaded 1.3.1 then the new release should be considered an essential upgrade. As usual, the application can be downloaded directly from https://inkscape.org

I’m still working my way through the bigger updates and changes that came with versions 1.2.x and 1.3.x. According to my notes, most of the things I still have to cover were added with 1.3, but there are a few stragglers on the 1.2 list. To keep my own housekeeping simpler I’m going to rattle through the outstanding 1.2 features this month, clearing the boards to concentrate on 1.3 going forwards. This will result in a bit of a hodgepodge of topics that don’t necessarily relate to one another in any manner other than the release version, and even though they were added in 1.2, I will be describing them as they currently appear in version 1.3.2. Alignment & Distribution snapping This is a feature that has been common in other vector graphics programs for some time – particularly those used for user interface mock-ups. This mode adds dynamic snap points that are derived from the positions of other elements in the page – a fancy way of saying that it makes it easier to ensure that items are neatly aligned or spaced as you drag them around.

There are two aspects to this feature: aligning to existing objects, and spacing evenly from nearby objects. By default these are both disabled, and need to be turned on from the Snap popup. If you use this in its simple mode, then you just need to switch on the ‘Alignment’ option at the bottom: If you use the advanced mode of the Snap popup then you’ll need to enable both ‘Alignment’ and ‘Same distances’ to enable both types of snapping. Note that the UI here is misleading, as it suggests that turning off ‘Alignment’ will also turn off ‘Same distances’ but that’s not really the case. Doing so will certainly disable the control in the popup, but its current state will still apply, meaning that it is possible to have ‘Same distances’ enabled while ‘Alignment’ is disabled, should you need to, with a bit of checkbox juggling. With both those options enabled, what effect does it have? Unfortunately this is a feature that is much more easily demonstrated with a video than a screenshot, but I’ll do my best. Consider a simple arrangement of three squares to which I wish to add a fourth one:

With this feature enabled, as I drag the blue square towards the others, various extender lines will be projected as the box becomes aligned with the center or edges of the existing elements, while other lines will appear between the items when the position of the blue box matches the spacing between the red ones. Here’s how it looks as I drag the blue box into place: Note the line running from the center of the last red box to the center of the blue one, indicating that this snap position has the centers vertically aligned; and the three spacing lines between each of the boxes indicating that this snap position will put the blue box equidistant from its peers. Achieving such alignments was already possible, but nowhere near as intuitive as with this system. It’s not quite as smooth and seamless as the same feature in some other applications, but it’s a welcome addition even in its current state. As I mentioned at the outset, this is a particularly common feature in UI mock-up tools, where it’s used to quickly line-up buttons, labels and other controls in a way that makes the result look more professional. This addition undoubtedly improves Inkscape’s capabilities in that regard. Consider this mock-up of a ‘card’ element for a web page, with a few arbitrary UI controls in it: previously just sorting out the alignment of the various elements would have taken as much time as producing the rest of the layout. Now, it’s trivial:

When using the Node tool to manually adjust node positions, it’s also possible to enable similar snapping to existing nodes within the same path. This can only be done via the advanced mode of the snap popup, by checking the ‘Nodes in same path’ option. Note that this adds extension lines and snapping to the horizontal and vertical positions of other nodes, but doesn’t provide the same guides for equidistant spacing as you see when moving whole objects. Node Tool improvements While we’re on the subject of the Node tool, this saw some small but useful additions with 1.2. You’re surely already aware that this tool allows you to select multiple nodes within a path by drawing a ‘rubber-band’ box that encompasses them. Sometimes this results in too many nodes being selected, and in the past you had to then deselect any unwanted nodes one-by-one, by clicking on them while holding Shift. Now, however, you can also draw a rubber-band box to deselect nodes en masse, by holding Shift and Control while you drag out the rectangle.

It’s also now possible to use the rubber-band mode to perform an ‘inverted’ node selection – the selected nodes will be all those that were outside the selection rectangle. Just hold Ctrl as you drag out the rectangle to achieve this. You could achieve the same previously by simply using Edit > Invert Selection after selecting the nodes, but just holding Ctrl while dragging is a slightly easier solution. There is one difference in behaviour, when dealing with complex paths: whereas Edit > Invert Selection could be used to invert the selection state of nodes in a single subpath, leaving other subpaths unaffected, the inverted rubber-band selection results in all the nodes outside the rectangle being selected, across all the subpaths. Set origin of Selector tool transformations

Switching to the Selector tool (F1), this gains a new ability that makes it easier to precisely position and scale items using the numeric fields in the tool control bar. This has always been possible, of course – who hasn’t adjusted the ‘W’ and ‘H’ fields to draw a rectangle of a specific size? But previously any such adjustment used the top-left of the bounding box as the reference point for any changes. (Note: In pre-1.0 releases the reference point was actually the bottom-left, but that version introduced a flip in the default orientation of the y-axis. If you switch back to the older orientation via the preferences then the reference point also switches back to the bottom-left). Whether it was top-left or bottom-left doesn’t really matter: the fact is that a single reference point was used. Type in some X and Y coordinates and that’s where the reference point would be placed. Adjust the width and height, and the reference corner would stay put, while the changes propagated out from there. 1.2 added the ability to set one of 8 different reference points for such transformations. With the Selection tool enabled, just click once on any of the 8 resize handles (the arrows that surround a selected object) to set that point as the reference. The arrow will go a very non-obvious shade of dark blue (at least on my theme), and barely perceptible lines will be projected across the canvas to indicate which corner or mid-edge is the current reference point. Click on the handle again to return to the default reference point.

This is another welcome addition, but with one caveat: it’s a shame there’s not a way to select the center-center point right in the middle of the bounding box. If you wish to position an element so that its center is at a specific set of coordinates, you will need to first select the mid-point handle for the top or bottom side, then set the x coordinate, then select the mid-point handle for the left or right side, then set the y-coordinates. In fact you might find it faster to draw a temporary rectangle, set the coordinates so that the top-left corner is in the desired position, then snap your real object to it using the alignment snapping mode described above. Tiling LPE A new LPE called ‘Tiling’ has been added, which provides similar functionality to the existing Edit > Clone > Create Tiled Clones… dialog. The biggest difference is that the output in this case is a complex path, rather than a collection of clones. It can also be a number of separate paths, if the ‘Split elements’ checkbox is enabled… but they’re still not clones in the traditional Inkscape sense (<use> elements in SVG terms).

The new LPE is certainly more interactive than the older dialog and arguably a little more intuitive (though not by much, to be honest). Note, however, that some of the more advanced aspects of the Tiled Clones dialog are not available in the LPE. If you just want to create a grid of elements, perhaps with a bit of variation or randomisation of positions and sizes, then this LPE might be just the thing for you. For my needs, I’ll be sticking with the Tiles Clones for now, but definitely keeping an eye on this extension to see if it is developed further in future releases. I don’t intent to describe this LPE any further, given that I’ve previously described the Tiled Clones dialog in a lot of detail (FCM #93 to #96). Many of the general principals are the same, and a lot can be inferred from trial and error. But if you do want me to go over this one in depth, drop a line to the magazine to indicate your interest.

Extensions Version 1.2 added a couple of new extensions (though one of them doesn’t actually live in the Extensions menu), and included a large number of rewrites and bug fixes to existing extensions. If you’re a frequent user of extensions, it might be worth checking the release notes to see if there have been changes to any that you rely on: https://wiki.inkscape.org/wiki/index.php/Release_notes/1.2#Extensions The first of the new extensions will only be of interest to users who import SVG files that were exported from Adobe Illustrator. Extensions > Document > Process Illustrator SVG… should be run immediately after importing such a file, in order to sort out issues with layer names and document scaling. If you are the one doing the exporting, it’s also worth taking a look at this extension before you export the file from Illustrator; launching the extension displays this dialog, which offers tips on how best to export in the first place.

The Clipart Importer extension is a replacement for the old ‘File > Import Clip Art…’ tool that was removed from Inkscape a few versions ago. Because of this, it doesn’t appear in the Extensions menu, but rather as File > Import Web Image. It allows you to search several different sources of clip art images for files that you can then import directly into your document. Note that you have to hit Enter in the search field to trigger the search, and if you switch sources you’ll have to focus the search field and press Enter again. Compared with the old tool, this one has a big advantage in terms of displaying licensing information where it’s available, helping to ensure that your own creations stay on the right side of copyright law.

In my experience the dialog doesn’t like being un-focused – which is a problem if, like me, you use a focus-follows-mouse configuration on your machine. It can lead to the appearance of Inkscape being unresponsive, and even clicking on the window didn’t re-focus it for me. Using Alt-Tab to bring the dialog back to the top of the stack did the job, so it’s probably worth trying that before reaching for the kill command. You should probably save your work as a precautionary measure before opening this dialog, just in case. And that’s it for the 1.2 series. There are still some smaller features and changes that I haven’t discussed, but I think I’ve covered all the really big and important things. Inkscape keeps pressing on with new releases, so my focus is now on more recent releases. See you next month for more new features that landed with 1.3.x.

issue201/inkscape.1706424738.txt.gz · Dernière modification : 2024/01/28 07:52 de d52fr