issue182:inkscape
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteDernière révisionLes deux révisions suivantes | ||
issue182:inkscape [2022/06/28 07:56] – d52fr | issue182:inkscape [2022/06/29 15:01] – ancienne révision (2022/06/29 09:33) restaurée auntiee | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
For now, these articles are still working through the many new Live Path Effects (LPEs) that were added with Inkscape 1.0 and 1.1. The topic for this instalment is a pair of new LPEs – “Power Clip” and “Power Mask” – which I first mentioned back in part 101. That article detailed the use of the new “Inverse Clip” and “Inverse Mask” menu entries, with little more than a scant reference to the fact that they’re actually implemented as LPEs. Now it’s time to dig into the effects that back these capabilities in a little more detail.** | For now, these articles are still working through the many new Live Path Effects (LPEs) that were added with Inkscape 1.0 and 1.1. The topic for this instalment is a pair of new LPEs – “Power Clip” and “Power Mask” – which I first mentioned back in part 101. That article detailed the use of the new “Inverse Clip” and “Inverse Mask” menu entries, with little more than a scant reference to the fact that they’re actually implemented as LPEs. Now it’s time to dig into the effects that back these capabilities in a little more detail.** | ||
+ | |||
+ | Comme prévu, Inkscape 1.2 est sorti le mois dernier avec de nombreuses nouvelles fonctionnalités et des mises à jour de l' | ||
+ | |||
+ | Pour l' | ||
+ | |||
**Power Clip | **Power Clip | ||
Ligne 10: | Ligne 15: | ||
A clipping path requires one other element to act on – the thing you’re trying to clip. That single element could, of course, be a group consisting of several other items, which allows complex designs to be easily clipped. But the clipping path itself is applied to only one element or group.** | A clipping path requires one other element to act on – the thing you’re trying to clip. That single element could, of course, be a group consisting of several other items, which allows complex designs to be easily clipped. But the clipping path itself is applied to only one element or group.** | ||
+ | |||
+ | Découpe avancée | ||
+ | |||
+ | Je ne vais pas mettre des gants blancs pour le dire : je pense que le nom de cet LPE est une affirmation très audacieuse qui est loin de correspondre à la réalité. Pour autant que je sache, cet effet ne fait qu'une seule et unique chose, et ne mérite pas vraiment l' | ||
+ | |||
+ | L' | ||
+ | |||
+ | Un chemin de découpe nécessite un autre élément sur lequel agir : l' | ||
+ | |||
**With this in mind, you might think that this LPE will become available if you have two items selected. In practice, however, the Path Effects dialog itself will chastise you with an “Only one item can be selected” message, and the “+” button will be disabled to prevent you even opening the Live Path Effects Selector dialog. How, then, do we apply this LPE in the first place? | **With this in mind, you might think that this LPE will become available if you have two items selected. In practice, however, the Path Effects dialog itself will chastise you with an “Only one item can be selected” message, and the “+” button will be disabled to prevent you even opening the Live Path Effects Selector dialog. How, then, do we apply this LPE in the first place? | ||
Ligne 18: | Ligne 32: | ||
Yes, if you have an already clipped object selected, only then will you be able to add this LPE in the normal manner.** | Yes, if you have an already clipped object selected, only then will you be able to add this LPE in the normal manner.** | ||
+ | |||
+ | En gardant cela à l' | ||
+ | |||
+ | Il existe en fait deux méthodes : | ||
+ | ••La première consiste à l' | ||
+ | ••L' | ||
+ | |||
+ | Oui, si vous avez sélectionné un objet déjà découpé, ce n'est que dans ce cas que vous pourrez ajouter ce LPE de la manière habituelle. | ||
+ | |||
**Whichever approach you take, this LPE really, really wants to create an inverted clip. If you add it directly via the menu entry, then that’s what will happen, as you would expect. Adding it via the dialog to an already clipped object, however, will immediately invert the clip that you’ve already applied – which might be a little more surprising if you’re not expecting it. | **Whichever approach you take, this LPE really, really wants to create an inverted clip. If you add it directly via the menu entry, then that’s what will happen, as you would expect. Adding it via the dialog to an already clipped object, however, will immediately invert the clip that you’ve already applied – which might be a little more surprising if you’re not expecting it. | ||
Ligne 25: | Ligne 48: | ||
If you really want a normal clip, then you can uncheck the “Inverse clip” option in the LPE’s parameters – though doing so raises the obvious question of why you want to use the LPE at all in that case. | If you really want a normal clip, then you can uncheck the “Inverse clip” option in the LPE’s parameters – though doing so raises the obvious question of why you want to use the LPE at all in that case. | ||
Perhaps the “power” in this LPE actually comes from the other two parameters? Well, the “Hide clip” option simply modifies the clipping path to remove the nodes that actually do the clipping – again, raising a question about why you wouldn’t just remove the clip entirely. As for “Flatten clip”: this is another entry in my box of LPE mystery parameters that appear to do something, but it’s not entirely clear quite what that something is. My own experiments with various combinations of objects and groups, primitives and paths, have failed to present me with any situation in which it does something useful. As usual, if you have any idea of how it’s meant to be used, please do get in touch.** | Perhaps the “power” in this LPE actually comes from the other two parameters? Well, the “Hide clip” option simply modifies the clipping path to remove the nodes that actually do the clipping – again, raising a question about why you wouldn’t just remove the clip entirely. As for “Flatten clip”: this is another entry in my box of LPE mystery parameters that appear to do something, but it’s not entirely clear quite what that something is. My own experiments with various combinations of objects and groups, primitives and paths, have failed to present me with any situation in which it does something useful. As usual, if you have any idea of how it’s meant to be used, please do get in touch.** | ||
+ | |||
+ | Quelle que soit l' | ||
+ | |||
+ | Pour rappel, une découpe normale préserve tout ce qui se trouve à l' | ||
+ | |||
+ | Si vous voulez vraiment une découpe normale, vous pouvez décocher l' | ||
+ | |||
+ | Peut-être que l'« avance » de ce LPE provient en fait des deux autres paramètres ? L' | ||
+ | |||
**One final important note about this LPE is how to go about removing it. If you only want to temporarily stop it being applied, then the usual approach with an LPE is to toggle the visibility icon (the “eye” image) in the Path Effects dialog. This may not, however, work as you expect. It will remove the inverting effect of the LPE, but still leave your object with the non-inverted clip applied. If you really want to see the object with no clip at all, then you’re back to using the “Hide” option in the LPE’s parameters. This feels a little awkward to me, as it requires users to understand too much about the implementation of clipping masks in SVG to fully appreciate why the normal visibility toggle doesn’t work the way they might expect. | **One final important note about this LPE is how to go about removing it. If you only want to temporarily stop it being applied, then the usual approach with an LPE is to toggle the visibility icon (the “eye” image) in the Path Effects dialog. This may not, however, work as you expect. It will remove the inverting effect of the LPE, but still leave your object with the non-inverted clip applied. If you really want to see the object with no clip at all, then you’re back to using the “Hide” option in the LPE’s parameters. This feels a little awkward to me, as it requires users to understand too much about the implementation of clipping masks in SVG to fully appreciate why the normal visibility toggle doesn’t work the way they might expect. | ||
Permanently removing this effect is even worse. Should you be foolish enough to delete the effect from the Path Effects dialog, as you might usually do, then you’re likely to find that your clipped objects disappear as well – almost certainly not what you wanted! Instead you have to release the clip using the Object > Clip > Release menu entry, or the context menu alternative. Even that comes with a sting in the tail: your original clipping path will also be deleted, so if you wanted to retain both that path and the object being clipped, you’re out of luck.** | Permanently removing this effect is even worse. Should you be foolish enough to delete the effect from the Path Effects dialog, as you might usually do, then you’re likely to find that your clipped objects disappear as well – almost certainly not what you wanted! Instead you have to release the clip using the Object > Clip > Release menu entry, or the context menu alternative. Even that comes with a sting in the tail: your original clipping path will also be deleted, so if you wanted to retain both that path and the object being clipped, you’re out of luck.** | ||
+ | |||
+ | Une dernière remarque importante à propos de ce LPE concerne la manière de le supprimer. Si vous voulez seulement empêcher temporairement son application, | ||
+ | |||
+ | Supprimer définitivement cet effet est encore pire. Si vous êtes assez fou pour supprimer l' | ||
+ | |||
**With that exhaustive examination of this “power” LPE, I’ve come to the conclusion that it serves only one useful purpose: to simplify the task of punching a hole in another object using a clipping path. To be fair, I think this is an exceptionally useful ability. I’m just not sure it warrants the “power” prefix, rather than simply being called “Inverse clip”. As useful as it is, do be aware of the problems and limitations that come with it. If you’ve got enough experience with Inkscape to be able to make your own inverse clipping paths, as I described way back in part 13, perhaps sticking with the old-fashioned approach is still the safer option.** | **With that exhaustive examination of this “power” LPE, I’ve come to the conclusion that it serves only one useful purpose: to simplify the task of punching a hole in another object using a clipping path. To be fair, I think this is an exceptionally useful ability. I’m just not sure it warrants the “power” prefix, rather than simply being called “Inverse clip”. As useful as it is, do be aware of the problems and limitations that come with it. If you’ve got enough experience with Inkscape to be able to make your own inverse clipping paths, as I described way back in part 13, perhaps sticking with the old-fashioned approach is still the safer option.** | ||
+ | |||
+ | Après cet examen exhaustif de ce LPE « avancé », j'en suis arrivé à la conclusion qu'il ne sert qu'à une seule chose : simplifier la tâche consistant à percer un trou dans un autre objet à l'aide d'un chemin de découpage. Pour être honnête, je pense que c'est une capacité exceptionnellement utile. Je ne suis simplement pas sûr qu' | ||
+ | |||
**Power Mask | **Power Mask | ||
Ligne 37: | Ligne 77: | ||
I prefer to keep my masks in shades of gray to provide clear control over their effects. A typical mask would use white for those areas that are to remain 100% opaque, black for those that are to become completely transparent, | I prefer to keep my masks in shades of gray to provide clear control over their effects. A typical mask would use white for those areas that are to remain 100% opaque, black for those that are to become completely transparent, | ||
+ | |||
+ | Masque avancé | ||
+ | |||
+ | Les masques sont souvent considérés comme une version plus « réaliste » du découpage. Alors que les clips fournissent des bords durs et un état binaire visible/ | ||
+ | |||
+ | Je préfère garder mes masques en nuances de gris pour permettre un contrôle clair de leurs effets. Un masque typique utilise le blanc pour les zones qui doivent rester 100% opaques, le noir pour celles qui doivent devenir complètement transparentes, | ||
+ | |||
**When applied as a normal mask, the white center to the design should ensure that the middle of the star remains solid, while the gradient out to the black edge will fade out the points of the star long before we reach their ends. Selecting both the star and the mask, then using the “Set Mask” context menu entry (or Object > Mask > Set) does, indeed, give the result we would expect (shown against a chequerboard background so you can see which parts are translucent). | **When applied as a normal mask, the white center to the design should ensure that the middle of the star remains solid, while the gradient out to the black edge will fade out the points of the star long before we reach their ends. Selecting both the star and the mask, then using the “Set Mask” context menu entry (or Object > Mask > Set) does, indeed, give the result we would expect (shown against a chequerboard background so you can see which parts are translucent). | ||
Ligne 43: | Ligne 90: | ||
Let’s take a closer look at the LPE’s parameters to work out exactly what’s happening here.** | Let’s take a closer look at the LPE’s parameters to work out exactly what’s happening here.** | ||
+ | |||
+ | Lorsqu' | ||
+ | |||
+ | Quel serait le résultat attendu si, à la place, nous utilisions Objet > Masque > Inverser (LPE) ? En se basant sur le comportement de l' | ||
+ | |||
+ | Regardons de plus près les paramètres du LPE pour comprendre exactement ce qui se passe ici. | ||
+ | |||
**Interestingly, | **Interestingly, | ||
Ligne 49: | Ligne 103: | ||
Hmm… not really. The problem now is that we’ve inverted every part of our mask – swapping black for white, light gray for dark gray, and so on – but that also includes the color of the background we’ve added. Now, therefore, the mask looks like this:** | Hmm… not really. The problem now is that we’ve inverted every part of our mask – swapping black for white, light gray for dark gray, and so on – but that also includes the color of the background we’ve added. Now, therefore, the mask looks like this:** | ||
+ | |||
+ | Il est intéressant de noter que, bien qu' | ||
+ | |||
+ | Avec cela en tête, le résultat final est un peu plus compréhensible. Mais ce n'est pas exactement ce que j' | ||
+ | |||
+ | Hmm... pas vraiment. Le problème, c'est que nous avons inversé chaque partie de notre masque - en remplaçant le noir par le blanc, le gris clair par le gris foncé, etc. Maintenant, le masque ressemble donc à ceci : | ||
+ | |||
**Again this explains the output we’re seeing, but it’s still not really what we had expected from an inverse mask. What we need is the hole in the middle from this version, but with the points of the stars still being visible, as we had in the previous one. In other words, we want a black center fading to a white shape that continues to fill the whole bounding box. The way to achieve that is to change the background color to black, so that the “Invert mask” checkbox has the effect of converting it to white. With that change, we finally get the look I was expecting from the outset. | **Again this explains the output we’re seeing, but it’s still not really what we had expected from an inverse mask. What we need is the hole in the middle from this version, but with the points of the stars still being visible, as we had in the previous one. In other words, we want a black center fading to a white shape that continues to fill the whole bounding box. The way to achieve that is to change the background color to black, so that the “Invert mask” checkbox has the effect of converting it to white. With that change, we finally get the look I was expecting from the outset. | ||
Ligne 59: | Ligne 120: | ||
• Ensure the “Add background” option is checked | • Ensure the “Add background” option is checked | ||
• Set the background color to black** | • Set the background color to black** | ||
+ | |||
+ | Encore une fois, cela explique le résultat que nous voyons, mais ce n'est toujours pas ce que nous attendions d'un masque inverse. Ce dont nous avons besoin est le trou au milieu de cette version, mais avec les pointes de l' | ||
+ | |||
+ | Pour résumer, afin de créer ce que je considère comme l' | ||
+ | ••Dessiner le masque | ||
+ | ••L' | ||
+ | ••Ouvrir la boîte de dialogue Effets de Chemin Interactifs pour accéder aux paramètres. | ||
+ | ••Définir l' | ||
+ | ••Vous assurer que l' | ||
+ | ••Définir la couleur de l' | ||
+ | |||
**That really is a lot of work, and it’s clear that the “Set Inverse (LPE)” option didn’t really do much to help us out. My advice, therefore, is to skip this LPE entirely, and just construct the mask you need with the right colors from the outset. Here’s what I would actually do to achieve the same result: | **That really is a lot of work, and it’s clear that the “Set Inverse (LPE)” option didn’t really do much to help us out. My advice, therefore, is to skip this LPE entirely, and just construct the mask you need with the right colors from the outset. Here’s what I would actually do to achieve the same result: | ||
Ligne 68: | Ligne 140: | ||
Admittedly it’s barely any fewer steps, but I’ll wager that this approach is a lot more intuitive to anyone with even a little experience using Inkscape.** | Admittedly it’s barely any fewer steps, but I’ll wager that this approach is a lot more intuitive to anyone with even a little experience using Inkscape.** | ||
+ | |||
+ | C'est vraiment beaucoup de travail, et il est clair que l' | ||
+ | ••Dessiner un rectangle blanc qui couvre l' | ||
+ | ••Dessinez un cercle noir au milieu | ||
+ | ••Flouter le cercle, ou lui donner un dégradé de noir à blanc pour créer des bords doux. | ||
+ | ••Regroupez le cercle et le rectangle pour créer le masque final. | ||
+ | ••Sélectionnez à la fois le masque et l' | ||
+ | |||
+ | Certes, il n'y a guère moins d' | ||
+ | |||
**And there you have these two new “power” LPEs which, on the surface, promise so much, yet deliver so little in reality. The Power Clip is potentially useful, but may create problems when you want to release the clip later. The Power Mask just doesn’t do anything that you can’t achieve by hand almost as easily, if not moreso. They’re both useful tools to know about, though – if only so that you understand how to achieve the same results without having to get the LPEs involved at all!** | **And there you have these two new “power” LPEs which, on the surface, promise so much, yet deliver so little in reality. The Power Clip is potentially useful, but may create problems when you want to release the clip later. The Power Mask just doesn’t do anything that you can’t achieve by hand almost as easily, if not moreso. They’re both useful tools to know about, though – if only so that you understand how to achieve the same results without having to get the LPEs involved at all!** | ||
+ | |||
+ | Et voilà ces deux nouveaux LPE « avancés » qui, en surface, promettent tant de choses, mais en réalité en offrent si peu. La Découpe avancée est potentiellement utile, mais peut créer des problèmes lorsque vous voulez libérer le découpage plus tard. Le Masque avancé ne fait rien que vous ne puissiez réaliser à la main presque aussi facilement, sinon plus. Ces deux outils sont néanmoins utiles à connaître, ne serait-ce que pour comprendre comment obtenir les mêmes résultats sans avoir à faire appel aux LPE ! | ||
+ | |||
issue182/inkscape.txt · Dernière modification : 2022/07/01 15:50 de andre_domenech