issue126:inkscape
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue126:inkscape [2017/10/29 18:21] – créée auntiee | issue126:inkscape [2017/11/07 12:27] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Last month’s look at the Live Path Effects added in 0.92 included a section on the Simplify effect. This adds a “live” version of one of Inkscape’s existing tools (Path > Simplify), whereas the older tool modifies the original path. The next LPE we’ll look at fills a similar niche – it’s another live version of an existing feature. It’s the “Roughen” LPE. | + | **Last month’s look at the Live Path Effects added in 0.92 included a section on the Simplify effect. This adds a “live” version of one of Inkscape’s existing tools (Path > Simplify), whereas the older tool modifies the original path. The next LPE we’ll look at fills a similar niche – it’s another live version of an existing feature. It’s the “Roughen” LPE. |
The go-to tool for adding some randomness to the shape of a path is the Tweak tool, described in detail in parts 22 and 23. The latter article describes using the tool to modify the nodes of an existing path, including the ability to roughen the path by adding new nodes and slightly randomizing their positions. As with Path > Simplify, the procedure modifies the original path, so there’s no way to subsequently tweak the settings to retrospectively alter the result. The Roughen LPE does the same job, but, being a Live Path Effect, allows you the flexibility to go back and change its parameters after the fact. One trade-off for this capability is that the effect applies to the whole of the path, whereas the Tweak tool is interactively “sprayed” onto the path, allowing you to confine its effects to a particular area, should you need to. But, if you need to work on an entire path, it’s well worth further investigation. | The go-to tool for adding some randomness to the shape of a path is the Tweak tool, described in detail in parts 22 and 23. The latter article describes using the tool to modify the nodes of an existing path, including the ability to roughen the path by adding new nodes and slightly randomizing their positions. As with Path > Simplify, the procedure modifies the original path, so there’s no way to subsequently tweak the settings to retrospectively alter the result. The Roughen LPE does the same job, but, being a Live Path Effect, allows you the flexibility to go back and change its parameters after the fact. One trade-off for this capability is that the effect applies to the whole of the path, whereas the Tweak tool is interactively “sprayed” onto the path, allowing you to confine its effects to a particular area, should you need to. But, if you need to work on an entire path, it’s well worth further investigation. | ||
- | To demonstrate this LPE, I’ve created a simple five-pointed star using the Stars and Polygons tool, then added the effect via the Path > Path Effects dialog. As you might expect, the dialog gains a number of parameters that can be adjusted to alter the result. | + | To demonstrate this LPE, I’ve created a simple five-pointed star using the Stars and Polygons tool, then added the effect via the Path > Path Effects dialog. As you might expect, the dialog gains a number of parameters that can be adjusted to alter the result.** |
- | With the settings shown in the screenshot, my simple star was immediately distorted into something more random. | + | Notre article du mois dernier sur les Effets de chemin dynamiques (LPE) ajoutés dans la 0.92 comprenait une section sur l' |
+ | |||
+ | L' | ||
+ | |||
+ | Pour présenter ce LPE, j'ai créé une simple étoile à cinq branches avec l' | ||
+ | |||
+ | **With the settings shown in the screenshot, my simple star was immediately distorted into something more random. | ||
To get a better idea of what’s happening, I’m going to add another new LPE to the chain: Show Handles. This draws representations of the path’s nodes and handles, which can be invaluable when trying to gain an understanding of exactly how your input path has been changed by the applied LPEs (more on this later). The first thing to notice is that our five-pointed star (which, if converted to a path, would have had 10 nodes) now has 20 nodes: | To get a better idea of what’s happening, I’m going to add another new LPE to the chain: Show Handles. This draws representations of the path’s nodes and handles, which can be invaluable when trying to gain an understanding of exactly how your input path has been changed by the applied LPEs (more on this later). The first thing to notice is that our five-pointed star (which, if converted to a path, would have had 10 nodes) now has 20 nodes: | ||
Ligne 11: | Ligne 17: | ||
This is due to the top section of the Roughen effect’s controls which adds extra nodes. More specifically, | This is due to the top section of the Roughen effect’s controls which adds extra nodes. More specifically, | ||
- | The top image shows the effect of using “By number of segments” to divide each path segment into two. The bottom picture uses “By max segment size”, resulting in two new nodes on the vertical arm, but three new ones on the longer horizontal arm. Returning to our star, therefore, the default settings split each segment into two, doubling the number of nodes. | + | The top image shows the effect of using “By number of segments” to divide each path segment into two. The bottom picture uses “By max segment size”, resulting in two new nodes on the vertical arm, but three new ones on the longer horizontal arm. Returning to our star, therefore, the default settings split each segment into two, doubling the number of nodes.** |
- | Once you’ve created more nodes to work with, it’s time to jiggle their positions | + | Avec les réglages présentés sur la copie d' |
- | It’s worth noting that the random seed for each of these controls defaults to 1 when the LPE is first added to a path. If you have several similar paths that you wish to roughen differently, therefore, it’s worth clicking each of these buttons | + | Pour avoir une meilleure idée de ce qui est arrivé, je vais ajouter un autre effet dynamique (LPE) à la chaîne : Afficher les poignées. Celui-ci dessine les représentations des nœuds et des poignées du chemin, ce qui peut être inestimable quand on essaie de comprendre exactement comment votre chemin |
- | To roughen a path, inserting new nodes and randomizing their positions may be sufficient. But this effect also provides a few options about what to do with the node handles. Our pointed star, with its straight line segments, offers little of interest when it comes to node handles, so, to demonstrate the possibilities, | + | Ceci est dû à la partie haute des contrôles de l' |
+ | |||
+ | L' | ||
+ | |||
+ | **Once you’ve created more nodes to work with, it’s time to jiggle their positions a bit. The “Jitter nodes” section lets you define the maximum amount that each node will be displaced – although the precise value for each is random. You can set different values for the X and Y directions, and the dice buttons will re-seed the random number generator, adjusting the node positions in either the X or Y directions accordingly. The “Extra roughen” section provides an additional displacement factor. This value acts as a multiplier – setting it to zero will cancel any displacement, | ||
+ | |||
+ | It’s worth noting that the random seed for each of these controls defaults to 1 when the LPE is first added to a path. If you have several similar paths that you wish to roughen differently, | ||
+ | |||
+ | Une fois que vous avez créé d' | ||
+ | |||
+ | Il peut être noté que la semence aléatoire de chacun de ces contrôles est à 1 par défaut lors de l' | ||
+ | |||
+ | **To roughen a path, inserting new nodes and randomizing their positions may be sufficient. But this effect also provides a few options about what to do with the node handles. Our pointed star, with its straight line segments, offers little of interest when it comes to node handles, so, to demonstrate the possibilities, | ||
To isolate the effects on the handles, without adding extra nodes to complicate matters, I’ve used the “By number of segments” mode, with that number reduced to 1. This effectively neuters the top part of the dialog, and no new nodes are added, though the existing ones will still be moved. The “Handles” pop-up towards the bottom of the dialog determines what will happen to the nodes’ handles. With the default setting of “Along nodes”, the handles simply move along [with the] nodes, maintaining their relative sizes and positions. | To isolate the effects on the handles, without adding extra nodes to complicate matters, I’ve used the “By number of segments” mode, with that number reduced to 1. This effectively neuters the top part of the dialog, and no new nodes are added, though the existing ones will still be moved. The “Handles” pop-up towards the bottom of the dialog determines what will happen to the nodes’ handles. With the default setting of “Along nodes”, the handles simply move along [with the] nodes, maintaining their relative sizes and positions. | ||
- | The “Rand” option randomises the position of the handles. Unfortunately, | + | The “Rand” option randomises the position of the handles. Unfortunately, |
- | “Retract”, | + | Pour « agiter » un chemin, l' |
+ | |||
+ | Pour isoler les effets sur les poignées, sans ajouter des nœuds supplémentaires qui complexifieraient le sujet, j'ai utilisé le mode « Par nombre de segments » avec un nombre réduit à 1. Ceci neutralise vraiment la partie supérieure du dialogue et aucun nœud n'est ajouté, tout en gardant une mobilité des nœuds existants. La liste déroulante « Poignées » en bas du dialogue détermine ce qui arrivera aux poignées des nœuds. Avec la valeur par défaut « Le long des nœuds », les poignées bougent simplement avec les nœuds (en même temps), conservant leurs tailles et positions relatives. | ||
+ | |||
+ | L' | ||
+ | |||
+ | **“Retract”, | ||
At the bottom of the dialog are three checkboxes, starting with “Shift Nodes”. With this unchecked, the nodes won’t move, regardless of the X, Y and Global settings. At first, this seems to rather defeat the point of the dialog, but it opens up a couple of possibilities that aren’t immediately obvious. With this unchecked, you can use the top section of this LPE as a means to subdivide your path into smaller sections without affecting its shape. This might be handy as a “pre-processing” step before sending the result to another effect. Another option is to uncheck this but to change the “Handles” pop-up, so that the nodes don’t move but the handles are still randomised, retracted or smoothed. | At the bottom of the dialog are three checkboxes, starting with “Shift Nodes”. With this unchecked, the nodes won’t move, regardless of the X, Y and Global settings. At first, this seems to rather defeat the point of the dialog, but it opens up a couple of possibilities that aren’t immediately obvious. With this unchecked, you can use the top section of this LPE as a means to subdivide your path into smaller sections without affecting its shape. This might be handy as a “pre-processing” step before sending the result to another effect. Another option is to uncheck this but to change the “Handles” pop-up, so that the nodes don’t move but the handles are still randomised, retracted or smoothed. | ||
- | The second checkbox seems less useful to me. It fixes the amount of allowed displacement to 1/3 of the length of the line segment, regardless of the X, Y and Global values. Why this should be a particularly good idea escapes me. I can understand that there might sometimes be a benefit to having the amount of displacement related to the length of the path segment, but, in that case, I would prefer to have a control to set that factor, rather than have it hard-coded as 1/3 of the segment size. | + | The second checkbox seems less useful to me. It fixes the amount of allowed displacement to 1/3 of the length of the line segment, regardless of the X, Y and Global values. Why this should be a particularly good idea escapes me. I can understand that there might sometimes be a benefit to having the amount of displacement related to the length of the path segment, but, in that case, I would prefer to have a control to set that factor, rather than have it hard-coded as 1/3 of the segment size.** |
- | The last checkbox, “Spray Tool friendly”, | + | « Rétracter », comme son nom le suggère, rétracte complètement les poignées, transformant vos segments de chemin en lignes droites, alors que « Adoucir » assure que les poignées de chaque côté de chaque nœud forme une ligne droite, avec comme résultat que le chemin passe doucement d'un segment à l' |
+ | |||
+ | En bas du dialogue, il y a trois cases à cocher, en commençant par « Déplacer les nœuds ». Quand elle est décochée, les nœuds ne bougent pas, quels que soient les réglages de X, Y et Aléa global. À première vue, ça semble plutôt jouer en défaveur de ce dialogue, mais cela ouvre quelques possibilités qui ne sont pas immédiatement évidentes. Quand elle est décochée, vous pouvez utiliser la section du haut de ce LPE comme un moyen de subdiviser votre chemin en segments plus petits sans modifier sa forme. Ça peut être pratique comme une étape de « pré-traitement » avant de passer le résultat à un autre effet. Une autre option consiste à décocher cette case, mais à modifier la liste « Poignées » de sorte que les nœuds ne peuvent pas bouger tout en pouvant encore disperser aléatoirement, | ||
+ | |||
+ | La deuxième case à cocher me semble moins utile. Elle fixe la quantité de déplacement autorisé à un tiers de la longueur du segment, quels que soient X, Y et aléa global. Je ne comprends pas pourquoi ceci serait une idée particulièrement bonne. Je peux comprendre qu'il puisse y avoir parfois un intérêt à ce que la quantité du déplacement soit en lien avec la longueur du segment, mais, dans ce cas, j' | ||
+ | |||
+ | **The last checkbox, “Spray Tool friendly”, | ||
So far, I’ve concentrated on using this effect to produce small changes to a path. In practice, an LPE called “Roughen” might be expected to have more dramatic effects in most situations. Returning to my original star shape, increasing the number of path segments, adjusting the X, Y and Global values, and randomizing the handles, produces arguably the output most people would expect from this effect. | So far, I’ve concentrated on using this effect to produce small changes to a path. In practice, an LPE called “Roughen” might be expected to have more dramatic effects in most situations. Returning to my original star shape, increasing the number of path segments, adjusting the X, Y and Global values, and randomizing the handles, produces arguably the output most people would expect from this effect. | ||
- | Having briefly introduced the Show Handles LPE earlier on, I’ll finish this month by delving into a little more detail. The UI for this effect is so straightforward that it barely warrants a mention: the three checkboxes toggle the visibility of nodes, handles, and the path itself, whilst the spinbox lets you set the size of the rendered nodes and handles. | + | Having briefly introduced the Show Handles LPE earlier on, I’ll finish this month by delving into a little more detail. The UI for this effect is so straightforward that it barely warrants a mention: the three checkboxes toggle the visibility of nodes, handles, and the path itself, whilst the spinbox lets you set the size of the rendered nodes and handles.** |
- | Compared with many LPEs, this UI is a model of simplicity. But what the UI doesn’t reveal is that there is a major problem with this effect which you really need to be aware of before using it: it completely wipes out any fill or stroke styles you might have applied to the original path. If your final aim is to render the nodes and handles – as in the images in this article – that’s perhaps not so much of a concern. But if you merely want to temporarily see what your chain of effects has done to the path, be aware that turning this LPE off, or even removing it entirely, won’t reinstate your original style settings. To be fair, the first time you try to add this effect in each session you are presented with the chance to back-out: | + | La dernière case à cocher, « Outil aérographe avec sympathie », est un mystère pour moi. L' |
- | If you press ahead, you’ll find that your path is reduced to a thin, black stroke, with no fill. You can subsequently set a fill or change the stroke, but remember that the output from any LPE is itself a single path (albeit one with sub-paths, in this case), so you can apply only one set of styles to the entire output. In other words, you can’t color the path differently to the handles or nodes – not without using multiple copies or clones of the path, at least. | + | Jusque là, je me suis limité à utiliser cet effet pour produire des petits changements sur un chemin. En pratique, un LPE appelé « Agitation » pourrait être suspecté d' |
- | What to do, then, if you do want to use this effect without altering the style of your original path? If you just want to view the results temporarily, | + | Ayant rapidement présenté plus haut le LPE Afficher les poignées, je finirai ce mois-ci en rentrant un peu plus dans le détail. L' |
- | The obvious approach | + | **Compared with many LPEs, this UI is a model of simplicity. But what the UI doesn’t reveal is that there is a major problem with this effect |
- | In the meantime, you can use the “Clone original path” LPE that was described in Part 47. In short, the steps you need to perform are: | + | If you press ahead, you’ll find that your path is reduced to a thin, black stroke, with no fill. You can subsequently set a fill or change the stroke, but remember that the output from any LPE is itself a single path (albeit one with sub-paths, in this case), so you can apply only one set of styles to the entire output. In other words, you can’t color the path differently to the handles or nodes – not without using multiple copies or clones of the path, at least.** |
+ | |||
+ | Par comparaison avec beaucoup de LPE, cet IU est un modèle de simplicité. Mais ce que ne révèle pas cet IU, c'est qu'il y a un problème majeur avec cet effet, dont vous devez vraiment être au courant avant de l' | ||
+ | |||
+ | Si vous validez, vous verrez votre chemin réduit à un mince filet noir, sans aucun remplissage. Vous pouvez ensuite ajouter un remplissage ou modifier le contour, mais souvenez-vous que la sortie de tout LPE est elle-même un unique chemin (quoique avec des sous-chemins, | ||
+ | |||
+ | **What to do, then, if you do want to use this effect without altering the style of your original path? If you just want to view the results temporarily, | ||
+ | |||
+ | The obvious approach is just to clone the original (select it and press Alt-D). With the clone selected, opening the Live Path Effects dialog will show a message at the bottom saying “Click add button to convert clone” or similar. As soon as you click the “+” button in the dialog to add a new LPE, you’ll find that a “Fill between many” effect is automatically added, and your clone’s fill and stroke become unset. I won’t go into the details of this effect now (but its appearance in this role has promoted it to the subject of next month’s column), but suffice to say that it offers one way to link an existing path into a new LPE chain. You can go ahead and add other effects if you wish – including “Show handles” – but as soon as you try to move the clone to another location, you’ll have problems. It tends to jump back to the position of the original path and although there are ways to persuade it to sit elsewhere, the slightest nudge will send it scurrying back to its parent again. I note in a related bug report that the main developer of LPEs has recently committed some improvements to this effect into the Inkscape trunk, so hopefully we’ll see this addressed in the next release.** | ||
+ | |||
+ | Alors, que faire si vous voulez absolument utiliser cet effet sans dégrader le style de votre chemin d' | ||
+ | |||
+ | L' | ||
+ | |||
+ | **In the meantime, you can use the “Clone original path” LPE that was described in Part 47. In short, the steps you need to perform are: | ||
• Select your original path and copy it to the clipboard. | • Select your original path and copy it to the clipboard. | ||
• Create a sacrificial path to attach the new LPE to. A simple two-node line will do. | • Create a sacrificial path to attach the new LPE to. A simple two-node line will do. | ||
Ligne 53: | Ligne 97: | ||
Part 47 also describes a shortcut, using Edit > Clone > Clone Original Path (LPE), but that now also applies the “Fill between many” effect, so, until the issues with it are ironed out, it’s probably best to stick with the steps above. | Part 47 also describes a shortcut, using Edit > Clone > Clone Original Path (LPE), but that now also applies the “Fill between many” effect, so, until the issues with it are ironed out, it’s probably best to stick with the steps above. | ||
- | Next month, I’ll continue looking at the new LPEs in 0.92, including a closer look at the “Fill between many” effect, and what it can more usefully be used for. | + | Next month, I’ll continue looking at the new LPEs in 0.92, including a closer look at the “Fill between many” effect, and what it can more usefully be used for.** |
+ | |||
+ | Entre temps, vous pouvez utiliser le LPE « Cloner le chemin original » qui est décrit dans la partie 47. En bref, les étapes que vous devrez suivre sont : | ||
+ | • Sélectionner votre chemin original et le copier dans le presse-papier. | ||
+ | • Créer un chemin à sacrifier pour lui attacher le nouveau LPE. Une simple ligne à deux nœuds suffit. | ||
+ | • Ajouter le LPE « Cloner le chemin original » au chemin à sacrifier. | ||
+ | • Cliquer sur le bouton « Chemin lié » dans le dialogue du LPE (le premier des deux boutons dans l'IU de l' | ||
+ | • Vous pouvez librement déplacer ce clone là où vous le voulez sur la page. | ||
+ | • Ajouter le LPE « Afficher les poignées » à la chaîne (ou, bien sûr, un autre LPE si vous le souhaitez). | ||
+ | |||
+ | La partie 47 décrit aussi un raccourci, en utilisant Éditer > Cloner > Cloner le chemin original (ECI), mais, alors, le LPE « Remplir dans les nuées » est aussi appliqué ; donc, tant que les problèmes n'ont pas été réglés, il vaut probablement mieux se limiter aux étapes ci-dessus. | ||
issue126/inkscape.1509297666.txt.gz · Dernière modification : 2017/10/29 18:21 de auntiee