Outils pour utilisateurs

Outils du site


issue161:inkscape

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
issue161:inkscape [2020/09/27 14:33] – créée auntieeissue161:inkscape [2020/10/06 17:40] (Version actuelle) andre_domenech
Ligne 1: Ligne 1:
-A recurring problem that new users face when starting to use Inkscape is the myriad ways of accidentally making something invisible. A few articles ago, I talked about this with regard to Outline View, and the new Visible Hairlines, Split View and XRay modes in version 1.0. But there’s one way of making objects disappear even from those tools, and which used to cause a lot of confusion for new users, as their objects vanished into the ether with no obvious way to retrieve them. Version 0.91 made recovery easier, and, with 1.0, we now have several new options on the context menu that make this feature something that might actually be more of a help than a hindrance.+**A recurring problem that new users face when starting to use Inkscape is the myriad ways of accidentally making something invisible. A few articles ago, I talked about this with regard to Outline View, and the new Visible Hairlines, Split View and XRay modes in version 1.0. But there’s one way of making objects disappear even from those tools, and which used to cause a lot of confusion for new users, as their objects vanished into the ether with no obvious way to retrieve them. Version 0.91 made recovery easier, and, with 1.0, we now have several new options on the context menu that make this feature something that might actually be more of a help than a hindrance.
  
-There is an “Object Properties” dialog in Inkscape, which is available from the right-click context menu, making it easy for new users to stumble upon. It allows you to set the ID, Label, Title and Description of your object, but, in practice, most of those items only have any real value when the SVG is loaded into a web browser and manipulated with JavaScript. Small JavaScript snippets can be entered directly into this dialog, via the Interactivity section at the bottom (see part 82 of this series).+There is an “Object Properties” dialog in Inkscape, which is available from the right-click context menu, making it easy for new users to stumble upon. It allows you to set the ID, Label, Title and Description of your object, but, in practice, most of those items only have any real value when the SVG is loaded into a web browser and manipulated with JavaScript. Small JavaScript snippets can be entered directly into this dialog, via the Interactivity section at the bottom (see part 82 of this series).**
  
-There are also a couple of checkboxes in this dialog that can easily tempt an unwary userThe “Lock” option stops you interacting with the object at all. Initially the object remains selectedand can be affected by keyboard shortcutsbut, as soon as the selection is removed – by clicking on the background or selecting another element – the object becomes completely inertYou can’t select itmove itresize itor delete itThe “Hide” checkbox also makes your object inert – but, in additionit makes it completely invisibleeven to the prying eyes of Outline View and its friends.+Les très nombreuses façons de rendre quelque chose accidentellement invisible sont un problème récurrent auquel font face les nouveaux utilisateurs quand ils commencent à utiliser InkscapeIl y a quelques articlesj'en ai parlé dans le cas de « Contour » et des nouveaux modes « Trains fins visibles »« Affichage scindé » et « Rayons X »Mais il y a une autre manière de faire disparaître les objetsmême à partir de ces outils-làet qui cause beaucoup de confusion pour les nouveaux utilisateurscar leurs objets s'évanouissent dans le néant sans solution évidente pour les retrouverLa version 0.91 rendait la récupération plus facile etavec la 1.0nous avons maintenant plusieurs options nouvelles dans le menu contextuel qui rendent cette fonctionnalité plus une aide qu'un obstacle.
  
-Back in the days of v0.48 and earlierthese checkboxes were a real problem for new usersThey would naively lock a bitmap they wished to manually trace overonly to find that the means to unlock it when they wanted to delete it was less than obvious. Similarlya right-click on it would no longer present the Object Properties option – thereby concealing another unlock possibilityA hidden object fared even worse: the behaviour was the samebut you couldn’t even see it to be sure you were right-clicking in the correct place!+Dans Inkscape existe un dialogue « Propriétés de l'objet » qui est accessible par le menu contextuel du clic droitfacilitant sa découverte par les nouveaux utilisateursIl vous permet de paramétrer l'IDl'étiquettele titre et la description de votre objet, mais, en pratique, la plupart de ces points n'ont de vraie valeur que quand le SVG est chargé dans un navigateur Web et manipulé avec JavaScriptDe courts bouts de code en Javascript peuvent être saisis directement dans ce dialoguevia la section Interactivité, en bas (voir la partie 82 de la série). 
  
-The correct way to unlock or unhide your object was actually to unlock or unhide all the objects in your drawingvia options in the Object menu. There was no UI (other than the XML editor) to let you unlock or unhide individual itemsmaking these capabilities rather useless for managing the state of very specific parts of your drawing.+**There are also a couple of checkboxes in this dialog that can easily tempt an unwary user. The “Lock” option stops you interacting with the object at all. Initially the object remains selectedand can be affected by keyboard shortcuts, but, as soon as the selection is removed – by clicking on the background or selecting another element – the object becomes completely inert. You can’t select itmove it, resize it, or delete it. The “Hide” checkbox also makes your object inert – but, in addition, it makes it completely invisible, even to the prying eyes of Outline View and its friends.
  
-With 0.91 came a new Objects dialog (Object > Objects… described in part 63)This lists every element in the drawing – including the hidden ones – with handy toggle buttons to (un)lock and (un)hide them. It’s very familiar interface in other graphics softwareand turns these properties into genuinely useful featuresPersonallyI think the checkboxes should have been removed from the Object Properties dialog to avoid further confusion, leaving them available only from the Objects dialog, but they still exist in the dialog to this day.+Back in the days of v0.48 and earlier, these checkboxes were real problem for new usersThey would naively lock a bitmap they wished to manually trace overonly to find that the means to unlock it when they wanted to delete it was less than obviousSimilarlya right-click on it would no longer present the Object Properties option – thereby concealing another unlock possibility. A hidden object fared even worse: the behaviour was the same, but you couldn’t even see it to be sure you were right-clicking in the correct place!**
  
-Inkscape v1.0 adds more UI niceties to work with these capabilities, by providing four new entries on the context menu:+Il y a aussi quelques cases à cocher dans ce dialogue, qui peuvent facilement tenter un utilisateur imprudent. L'option « Verrouiller » arrête complètement votre interaction avec l'objet. Juste après, l'objet reste sélectionné et peut être visé par des raccourcis clavier, mais, dès que la sélection est enlevée - en cliquant sur l'arrière-plan ou en sélectionnant un autre élément - l'objet devient totalement inerte. Vous ne pouvez ni le sélectionner, ni le bouger, le redimensionner ou l'effacer. La case à cocher « Cacher » rend aussi votre objet inerte - mais, en plus, elle le rend complètement invisible, même sous les yeux implorants de « Contour » et de ses amis. 
 + 
 +À l'époque de la 0.48 et avant, ces cases à cocher étaient un vrai problème pour les nouveaux utilisateurs. Ils verrouillaient naïvement un bitmap qu'ils souhaitaient retoucher à la main, pour découvrir que le moyen de le déverrouiller quand ils voulaient l'effacer était moins qu'évident. De même, un clic droit dessus ne proposait plus l'option des Propriétés de l'objet - excluant de fait une autre voie pour le déverrouiller. Un objet caché s'en sortait encore moins bien : le comportement était le même, mais vous ne pouviez pas le voir pour être sûr que vous faisiez un clic droit au bon endroit ! 
 + 
 +**The correct way to unlock or unhide your object was actually to unlock or unhide all the objects in your drawing, via options in the Object menu. There was no UI (other than the XML editor) to let you unlock or unhide individual items, making these capabilities rather useless for managing the state of very specific parts of your drawing. 
 + 
 +With 0.91 came a new Objects dialog (Object > Objects… described in part 63). This lists every element in the drawing – including the hidden ones – with handy toggle buttons to (un)lock and (un)hide them. It’s a very familiar interface in other graphics software, and turns these properties into genuinely useful features. Personally, I think the checkboxes should have been removed from the Object Properties dialog to avoid further confusion, leaving them available only from the Objects dialog, but they still exist in the dialog to this day.** 
 + 
 +La façon correcte de déverrouiller ou de démasquer votre objet consistait en fait à déverrouiller ou démasquer tous les objets de votre dessin, via les options du menu Objet. Il n'y avait pas d'interface utilisateur (UI), autre que l'éditeur XML, pour vous permettre le déverrouillage ou l'affichage d'éléments individuels, rendant ces possibilités plutôt inutiles pour gérer l'état de parties très spécifiques de votre dessin. 
 + 
 +Avec la 0.91 vinrent un nouveau dialogue Objets (Objets -> Objets.. décrite dans la partie 63). Celui-là fait la liste de tous les objets de votre dessin, y compris ceux qui sont cachés, avec des boutons de commutation pratiques pour les (dé)verrouiller et (dé)masquer. C'est une interface très classique dans d'autres logiciels graphiques, qui transforme ces propriétés en fonctionnalités véritablement utiles. Personnellement, je pense que les cases à cocher auraient dû être enlevées du dialogue des Propriétés de l'objet pour éviter toute confusion, en ne les laissant disponibles que dans le dialogue des Objets, mais elles existent encore aujourd'hui dans le dialogue Propriétés de l'objet. 
 + 
 +**Inkscape v1.0 adds more UI niceties to work with these capabilities, by providing four new entries on the context menu:
 Hide selected objects Hide selected objects
 Unhide objects below Unhide objects below
Ligne 17: Ligne 29:
 Unlock objects below Unlock objects below
  
-The Hide and Lock entries are pretty self-explanatory. The one caveat to be aware of is that they hide or lock the objects that are selected, which may not include the one you’ve right-clicked on. Make sure to select all the target objects before right-clicking.+The Hide and Lock entries are pretty self-explanatory. The one caveat to be aware of is that they hide or lock the objects that are selected, which may not include the one you’ve right-clicked on. Make sure to select all the target objects before right-clicking.** 
 + 
 +Inkscape 1.0 ajoute d'autres jolies petites choses à l'UI pour travailler avec ces possibilités, en fournissant quatre nouvelles entrées dans le menu contextuel : 
 +Cacher les objets sélectionnés 
 +Montrer les objets en dessous 
 +Verrouiller les objets sélectionnés 
 +Déverrouiller les objets en dessous 
 + 
 +Les entrées Cacher et Verrouiller se comprennent d'elles-mêmes. Le nouveau problème auquel il faut être attentif, c'est qu’elles cachent ou verrouillent les objets sélectionnés, ce qui n'inclut pas forcément celui sur lequel vous avez fait le clic droit. Vérifiez tous les objets ciblés avant de faire le clic droit. 
 + 
 +**The Unhide and Unlock options refer to “below” in their titles. In this case they mean “below the mouse pointer”. Right-click on a locked object and select the Unlock option to unlock it. It doesn’t get much simpler than that, right? But there is a caveat: this operation will unlock any object below the mouse pointer, regardless of what layer it’s on, even if the layer itself is hidden and locked! And, as the plural in the menu title suggests, if you have multiple locked items stacked on top of each other below the position where you right-click, they’ll all be unlocked. 
 + 
 +Unhiding follows the same rules, but it’s obviously a little harder to find the correct spot to right-click on. As mentioned, none of the usual options for seeing invisible objects will work, so I hope you’ve kept track of where everything is in your drawing. To help with this treasure hunt just a little, the Unhide menu option will be enabled only if there is actually a hidden object below the mouse pointer, so you can be sure you’re in the right place. If you can’t find the object easily then a trip to the Objects dialog is probably a better use of your time than trying to play a hobbled version of Battleships against Inkscape.** 
 + 
 +Les options Montrer et Déverrouiller font référence à « en dessous » dans leurs titres. Dans le cas présent, ça signifie « sous le pointeur de la souris ». Faites un clic droit sur un objet verrouillé et sélectionnez l'option Déverrouiller pour le... déverrouiller. Ça peut difficilement être plus simple, n'est-ce pas ? Mais il y a un problème : cette opération déverrouillera tout objet sous le pointeur de la souris, quel que soit le calque où il se trouve, même si le calque lui-même est caché et verrouillé ! Et, comme le suggère le pluriel du titre du menu, si vous avez plusieurs objets verrouillés empilés les uns sur les autres sous l'emplacement où vous avez fait le clic droit, ils seront tous déverrouillés. 
 + 
 +Montrer suit les mêmes règles, mais c'est évidemment un peu plus dur de trouver l'endroit correct pour faire le clic droit. Comme déjà signalé, aucune des options habituelles pour voir des objets ne marchera ; aussi, j'espère que vous avez gardé une trace d'où se trouve chaque élément dans votre dessin. Pour aider juste un peu dans cette chasse au trésor, l'option Montrer du menu ne sera activée que s'il y a vraiment un objet caché sous le pointeur de la souris ; aussi, vous êtes assuré d'être à la bonne place. Si vous ne pouvez pas trouver facilement l'objet, un petit tour dans le dialogue de l'Objet est probablement un meilleur usage de votre temps que d'essayer une version boiteuse de Battleships contre Inkscape. 
 + 
 +**The Unlock menu option also becomes enabled and disabled based on whether or not there’s a locked item below the mouse pointer, but it gets confused by locked layers, becoming enabled when you right-click over any object in the locked layer, regardless of whether or not the object itself is locked. 
 + 
 +Despite these minor issues, adding the options to the context menu is a welcome change that surfaces these long-standing capabilities of the program in a way that makes them not only more discoverable, but also more usable. Small changes like this may not get the fanfare of the big new features, but, by making users’ day-to-day workflows a little easier and more flexible, they’re every bit as welcome.** 
 + 
 +L'option Déverrouiller du menu est aussi activée ou désactivée suivant la présence ou non d'un objet verrouillé sous le pointeur de la souris, mais elle est perturbée par les calques verrouillés, devenant alors active quand vous faites un clic droit sur tout objet du calque verrouillé, que l'objet soit verrouillé ou non. 
 + 
 +En dépit des ces problèmes mineurs, l'ajout de ces options au menu contextuel est une modification bienvenue qui fait ressortir ces fonctionnalités anciennes du programme d'une manière qui les rend plus faciles à découvrir, mais aussi plus utilisables. Des petits changements comme celui-là n'auront pas droit à la fanfare des nouvelles fonctionnalités importantes, mais, en rendant le travail quotidien des utilisateurs un peu plus facile et flexible, chaque petit plus est bienvenu. 
 + 
 +**Another small new feature is even more welcome, at least by me: inverse clipping. This is an omission from the SVG specs which has always frustrated me, not least because it solves common problems trivially, but is no harder for a browser or graphics program to implement than the standard clipping routines. For lack of an extra paragraph or two in the spec, users have been forced to spend time reinventing inverse clipping with their own complex paths time and time again. 
 + 
 +I covered clipping all the way back in part 13 of this series. If you’re a very long-term reader, you may recall that this series began with a few articles to help you get to grips with the basics of Inkscape by drawing a snowman. By part 13 it was time to adorn him with a scarf.** 
 + 
 +Une autre petite nouvelle fonctionnalité est encore plus bienvenue, au moins pour moi : le découpage inverse. C'est une omission des specifs SVG qui m'a toujours frustré ; non seulement parce qu'elle résout banalement des problèmes ordinaires, mais qu'elle n'est pas plus dure à implémenter dans un navigateur Web ou un programme de dessin que les routines de découpage normales. Du fait du manque d'un ou deux paragraphes dans la spécif, les utilisateurs ont été forcés de perdre du temps à réinventer le découpage inverse à maintes reprises avec leurs propres chemins complexes. 
 + 
 +J'ai tout expliqué du découpage dans la partie 13 de cette série. Si vous lisez la revue depuis longtemps, vous vous rappelez peut-être que cette série a commencé avec quelques articles pour vous aider à acquérir les bases d'Inkscape en dessinant un bonhomme de neige. Depuis la partie 13, il était temps de le décorer avec un foulard. 
 + 
 +**I began by drawing a scarf in its entirety, including the part that would normally be hidden behind the snowman’s head (“neck” seems a little too generous a term in this case). I first demonstrated how a simple clipping path (in green) wouldn’t do the job – it would leave the back of the scarf visible, whilst hiding the part you actually wanted to see. 
 + 
 +It’s a classic approach: first show the audience what doesn’t work, then follow up with a demonstration of what does work. In this case, it’s an “inverse clipping mask”, created by using Path > Difference to cut the desired shape out of a larger enclosing rectangle. The resultant complex path is then used for clipping, giving the desired result.** 
 + 
 +J'ai commencé par dessiner intégralement un foulard, y compris la partie que serait normalement cachée par la tête du bonhomme de neige. (« cou » semble un mot trop généreux dans notre cas). J'avais d'abord démontré comment un simple chemin de découpe (en vert) ne ferait pas l'affaire - il laisserait visible l'arrière du foulard, tandis qu'il masquerait la partie que vous voulez vraiment voir. 
 + 
 +C'est une approche classique : d'abord montrer aux participants ce qui ne marche pas, puis poursuivre par une démonstration de ce qui fonctionne. Dans notre cas, c'est un « masque de découpe inverse » créé par Chemin > Différence pour extraire la forme désirée d'un rectangle englobant plus large. Le chemin complexe résultant est ensuite utilisé pour la découpe, donnant le résultat escompté. 
 + 
 +**It works, but it’s not really beginner friendly. When a new user just wants to cut the center out of a circle to make a donut, being forced to confront Boolean operations and bounding boxes makes Inkscape seem rather unfriendly. If the SVG Working Group had only added an “inverse” parameter to clipping paths all those years ago, Inkscape probably would have included this feature from the earliest versions. As it is, we’ve had to wait until now – and it’s still included only as a user-friendly addition by the developers, not because of any change to the SVG specs itself (this option was proposed for SVG2, but didn’t make the cut, much to my ongoing frustration). 
 + 
 +So how does this new feature work in Inkscape? As with many “extensions” to the basic SVG capabilities, it’s implemented as a Live Path Effect (LPE). But, like several other LPEs, it’s available directly from the normal Inkscape UI, so you don’t need to deal directly with the LPE to benefit from it. I’ll cover the new “Power Clip” LPE that is behind it in a future instalment but, for now, let’s just see how we might use it to work with our snowman’s scarf.**
  
-The Unhide and Unlock options refer to “below” in their titlesIn this case they mean “below the mouse pointer”Right-click on a locked object and select the Unlock option to unlock it. It doesn’t get much simpler than thatright? But there is caveat: this operation will unlock any object below the mouse pointerregardless of what layer it’s oneven if the layer itself is hidden and locked! Andas the plural in the menu title suggestsif you have multiple locked items stacked on top of each other below the position where you right-clickthey’ll all be unlocked.+Ça marche, mais ce n'est pas vraiment facile pour un débutantQuand un nouvel utilisateur veut juste enlever le centre d'un cercle pour en faire un donut, se trouver contronté à des opérations booléennes et des boîtes englobantes rend Inkscape plutôt inhospitalierSiil y bien longtempsle groupe de travail du SVG avait juste ajouté le paramètre « inverse » à la découpe des cheminsInkscape aurait probablement inclus cette fonctionnalité dans les versions précédentes. Quoiqu'il en soitnous avons dû attendre jusqu'à maintenant ; et ce n'est inclus que grâce à la bonne volonté des développeurset non parce qu'il y aurait eu une modification des spécifs du SVG lui-même (cette option a été proposée pour SVG2, mais n'a pas été acceptéeprincipale raison de ma frustration actuelle).
  
-Unhiding follows the same rulesbut it’s obviously little harder to find the correct spot to right-click onAs mentionednone of the usual options for seeing invisible objects will workso I hope you’ve kept track of where everything is in your drawingTo help with this treasure hunt just a littlethe Unhide menu option will be enabled only if there is actually a hidden object below the mouse pointerso you can be sure you’re in the right place. If you can’t find the object easily then a trip to the Objects dialog is probably a better use of your time than trying to play a hobbled version of Battleships against Inkscape.+Alorscomment marche cette nouvelle fonctionnalité dans Inkscape ? Comme avec de nombreuses « extensions » aux capacités de base du SVG, elle été implémentée comme un Effet de chemin interactif (ECI, en anglais, LPE Live Path Effect)Mais comme plusieurs autres ECIelle est directement disponible dans l'interface utilisateur normale d'Inkscape ; ainsivous n'avez pas besoin de vous occuper directement des ECI pour en bénéficierJe parlerai du nouvel ECI « Découpe avancée » qui se cache derrière dans un prochain articlemaispour le moment, voyons juste comment nous pouvons l'utiliser pour travailler sur le foulard de notre bonhomme de neige.
  
-The Unlock menu option also becomes enabled and disabled based on whether or not there’s a locked item below the mouse pointer, but it gets confused by locked layersbecoming enabled when you right-click over any object in the locked layer, regardless of whether or not the object itself is locked.+**There’s no real trick to it, actually. You just create a path (or an object that can be converted to a path) that encloses the part of the image you want to clip away. Then select both the clipping path and the object or group to be clipped and you’re ready to proceed. Whereas the option for a normal clip can be found on the context menu, it takes a trip to the Object > Clip > Set Inverse (LPE) option to trigger the inverse mode. And that’s it. No complex paths or bounding boxes. Just a simple interface for what should be a simple task.
  
-Despite these minor issuesadding the options to the context menu is a welcome change that surfaces these long-standing capabilities of the program in way that makes them not only more discoverable, but also more usableSmall changes like this may not get the fanfare of the big new features, but, by making users’ day-to-day workflows little easier and more flexiblethey’re every bit as welcome.+Internallyof course, complex paths and bounding boxes still come into play. You can see this by switching to the Node tool (F2), where you’ll see that Inkscape has automatically created complex path consisting of your clipping path and another that hugs the bounding box of your selected objectAs usual, you can edit the nodes and lines of these paths for an instant effect on the clipped object – ideal for fine-tuning the resultant shape to make sure your scarf provides nicesnug fit.**
  
-Another small new feature is even more welcomeat least by me: inverse clippingThis is an omission from the SVG specs which has always frustrated menot least because it solves common problems trivially, but is no harder for a browser or graphics program to implement than the standard clipping routinesFor lack of an extra paragraph or two in the specusers have been forced to spend time reinventing inverse clipping with their own complex paths time and time again.+En faitce n'est pas vraiment difficileVous créez simplement un chemin (ou un objet qui peut être converti en chemin) qui englobe la partie de l'image que vous voulez découper. Ensuitesélectionnez à la fois le chemin de découpe et l'objet ou le groupe à découper et vous êtes prêt à agirAlors que l'option pour une découpe normale se trouve dans le menu contextuelle déclenchement du mode inverse nécessite un déplacement vers l'option Objet > Découpe > Inverser (ECI). Et c'est tout. Pas de chemins complexes ou de boîtes englobantes. Juste une simple interface pour ce qui devrait être une simple tâche.
  
-I covered clipping all the way back in part 13 of this seriesIf you’re a very long-term readeryou may recall that this series began with a few articles to help you get to grips with the basics of Inkscape by drawing snowmanBy part 13 it was time to adorn him with a scarf.+En interne, bien sûr, des chemins complexes et des boîtes englobantes entrent en jeuVous pouvez le voir en passant sur l'outil Nœuds (F2)où vous verrez qu'Inkscape a automatiquement créé un chemin complexe fait du chemin de découpe et d'un autre qui enserre la boîte englobante de l'objet sélectionnéComme d'habitude, vous pouvez modifier les nœuds et les lignes de ces chemins pour un effet instantané sur votre objet découpé ; c'est idéal pour peaufiner la forme résultante et vous assurer que votre foulard s'ajuste joliment et confortablement.
  
-I began by drawing a scarf in its entirety, including the part that would normally be hidden behind the snowman’s head (“neck” seems little too generous a term in this case)I first demonstrated how a simple clipping path (in green) wouldn’t do the job – it would leave the back of the scarf visible, whilst hiding the part you actually wanted to see.+**There’s also new inverse mode for masks, though its behaviour is not so obvious. Masking was covered in part 14It’s basically similar to clipping, but uses the color of each pixel in the mask to determine the opacity of that part of the masked object. White parts remain visible, black or transparent parts are made transparent, and values in-between have their opacity set accordingly. Typically it’s used where you want to fade the object, rather than produce the abrupt edge that clipping gives. Here’s an example where I use a blurred white object as a mask to remove the outside of a colored rectangle.
  
-It’s classic approach: first show the audience what doesn’t workthen follow up with demonstration of what does work. In this case, it’s an “inverse clipping maskcreated by using Path > Difference to cut the desired shape out of a larger enclosing rectangle. The resultant complex path is then used for clipping, giving the desired result.+This particular result could obviously be produced simply by blurring colored ellipsebut in a real example you might have far more complex shape in your mask, or the object you’re masking might be a group made up of lots of different elements.**
  
-It worksbut it’s not really beginner friendlyWhen a new user just wants to cut the center out of a circle to make a donutbeing forced to confront Boolean operations and bounding boxes makes Inkscape seem rather unfriendlyIf the SVG Working Group had only added an “inverse” parameter to clipping paths all those years agoInkscape probably would have included this feature from the earliest versionsAs it iswe’ve had to wait until now – and it’s still included only as a user-friendly addition by the developers, not because of any change to the SVG specs itself (this option was proposed for SVG2, but didn’t make the cut, much to my ongoing frustration).+Un nouveau mode existe aussi pour les masquesbien que son comportement ne soit pas évidentLes masques ont été traités en partie 14. C'est en gros similaire à la découpemais la couleur de chaque pixel du masque est utilisée pour déterminer l'opacité de cette partie de l'objet masquéLes parties blanches restent visiblesles parties noires et transparentes sont rendues transparentes et les valeurs intermédiaires voient leur opacité réglée en conséquenceClassiquementc'est utilisé là où vous voulez rendre un objet moins visible plutôt que produire le bord net que donne la découpe. Voici un exemple où j'ai utilisé un objet blanc flouté comme masque pour enlever l'extérieur d'un rectangle coloré.
  
-So how does this new feature work in Inkscape? As with many “extensions” to the basic SVG capabilitiesit’s implemented as a Live Path Effect (LPE). Butlike several other LPEsit’s available directly from the normal Inkscape UI, so you don’t need to deal directly with the LPE to benefit from it. I’ll cover the new “Power Clip” LPE that is behind it in a future instalment but, for now, let’s just see how we might use it to work with our snowman’s scarf.+Ce résultat particulier peut être évidemment obtenu simplement en floutant une ellipse coloréemais dans un vrai exemplevous pourriez avoir une forme largement plus compliquée comme masqueou l'objet à masquer pourrait être un groupe fait de nombreux éléments différents.
  
-There’s no real trick to itactually. You just create a path (or an object that can be converted to a path) that encloses the part of the image you want to clip awayThen select both the clipping path and the object or group to be clipped and you’re ready to proceed. Whereas the option for normal clip can be found on the context menuit takes a trip to the Object > Clip > Set Inverse (LPE) option to trigger the inverse mode. And that’s it. No complex paths or bounding boxes. Just simple interface for what should be a simple task.+**Once again, the SVG spec offers no inverse version of a mask. But Inkscape provides such a feature in v1.0, so to cut hole in the colored rectanglesurely just requires us to use the Object > Mask > Set Inverse (LPE) option, right? Of course not! That would be far too sensible. Instead the result is just colored rectangle, as though no mask even existed.
  
-Internally, of course, complex paths and bounding boxes still come into play. You can see this by switching to the Node tool (F2), where youll see that Inkscape has automatically created complex path consisting of your clipping path and another that hugs the bounding box of your selected objectAs usual, you can edit the nodes and lines of these paths for an instant effect on the clipped object – ideal for fine-tuning the resultant shape to make sure your scarf provides a nice, snug fit.+Whats happening here is discussion for another article – probably once I get round to a further examination of the new LPEs in version 1.0Suffice to say that we can get the effect we’re after by drawing the mask in black rather than white, then using the Set Inverse option.**
  
-There’s also a new inverse mode for masksthough its behaviour is not so obviousMasking was covered in part 14It’s basically similar to clippingbut uses the color of each pixel in the mask to determine the opacity of that part of the masked object. White parts remain visibleblack or transparent parts are made transparentand values in-between have their opacity set accordinglyTypically it’s used where you want to fade the objectrather than produce the abrupt edge that clipping gives. Here’s an example where I use a blurred white object as a mask to remove the outside of a colored rectangle.+Une fois encorela spécif SVG n'offre pas de version inverse pour un masqueMais Inkscape fournit une telle fonctionnalité dans la v1.0 ; ainsipour faire un trou dans un rectangle coloréil est juste nécessaire d'utiliser l'option Objet > Masque > Inverser (ECI)n'est-ce pas ? Bien sûr que non ! Ce serait bien trop raisonnableÀ la placele résultat n'est qu'un rectangle coloré, comme si aucun masque n'existait.
  
-This particular result could obviously be produced simply by blurring a colored ellipsebut in a real example you might have a far more complex shape in your mask, or the object you’re masking might be a group made up of lots of different elements.+Ce qui se passe ici fera l'objet d'une présentation dans un autre article - probablement quand j'aurai fait un examen approfondi des nouveaux ECI de la v1.0 . Il suffit de dire que vous pouvez obtenir l'effet dont nous parlons en dessinant le masque en noir plutôt qu'en blancpuis en utilisant l'option Inverser (ECI).
  
-Once again, the SVG spec offers no inverse version of mask. But Inkscape provides such a feature in v1.0, so to cut a hole in the colored rectanglesurely just requires us to use the Object > Mask > Set Inverse (LPEoption, right? Of course not! That would be far too sensible. Instead the result is just a colored rectangleas though no mask even existed.+**The irony here is that we’ve had to manually invert the color of the mask in order to use the automatic feature for inverting the mask! There is some logic to thisbut it’s tied up to the way the LPE operates, and the default settings that get applied when you select this option. For nowI’ll be sticking to creating inverse masks by hand, the old fashioned waybut I can definitely see a lot of inverse clipping paths in my future.
  
-What’s happening here is a discussion for another article – probably once I get round to a further examination of the new LPEs in version 1.0. Suffice to say that we can get the effect we’re after by drawing the mask in black rather than whitethen using the Set Inverse option.+There’s one final caveat to using these new features: because they’re implemented as Live Path Effects, they won’t work directly on bitmap images. Note the word “directly” – these LPEs can also be used on groups, even if the group contains only a single bitmap imageSo, if you really want to poke a hole through a treasured family photo, just put it into its own group, then get going with the inverse clip or mask. I usually advise putting a bitmap into a single-object group anyway, as it opens up some other creative possibilities I’ve covered in the pastso it’s perhaps worth getting into the habit of always grouping a bitmap as soon as you place it in your drawing.**
  
-The irony here is that we’ve had to manually invert the color of the mask in order to use the automatic feature for inverting the maskThere is some logic to thisbut it’s tied up to the way the LPE operates, and the default settings that get applied when you select this option. For nowI’ll be sticking to creating inverse masks by handthe old fashioned waybut I can definitely see a lot of inverse clipping paths in my future.+L'ironie ici, c'est que nous devons inverser manuellement la couleur du masque pour utiliser une fonctionnalité automatique d'inversion du masque Il y a quelque chose de logique là dedansmais c'est lié à la façon dont l'ECI fonctionne et aux paramètres par défaut qui sont appliqués quand vous sélectionnez cette option. Pour le momentje m'en tiens à la création à la main des masques d'inversionà l'anciennemais je peux vraiment voir beaucoup de chemins de découpe inverse dans mon futur.
  
-There’s one final caveat to using these new featuresbecause they’re implemented as Live Path Effectsthey won’t work directly on bitmap images. Note the word “directly” – these LPEs can also be used on groupseven if the group contains only a single bitmap imageSoif you really want to poke a hole through a treasured family photo, just put it into its own groupthen get going with the inverse clip or maskI usually advise putting a bitmap into a single-object group anywayas it opens up some other creative possibilities I’ve covered in the pastso it’s perhaps worth getting into the habit of always grouping a bitmap as soon as you place it in your drawing.+Il y a un dernier problème dans l'utilisation de ces nouvelles fonctionnalités comme elles sont implémentées comme des Effets de Chemins Interactifselles ne marchent pas directement sur des images bitmapNotez le mot « directement » ; ces ECI peuvent aussi être utilisés sur des groupesmême si le groupe n'est composé que d'une seule image bitmap. Ainsisi vous voulez vraiment percer un trou au milieu d'une précieuse photo de familleplacez-la simplement dans son propre groupepuis poursuivez avec la découpe ou le masque inverse. Je conseille habituellement de mettre de toute façon un bitmap dans un groupe mono-objetcar ça ouvre d'autres possibilités de création dont j'ai parlé dans le passé ; aussiil vaut peut-être mieux prendre l'habitude de toujours grouper un bitmap dès que vous le mettez dans votre dessin
  
issue161/inkscape.1601210018.txt.gz · Dernière modification : 2020/09/27 14:33 de auntiee