issue73: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édente | ||
issue73:inkscape [2013/10/01 21:50] – fcm_-_ekel | issue73:inkscape [2013/10/08 18:08] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
**One thing you've probably noticed about Inkscape throughout the course of this series is that it operates with a stack of objects placed one above another—the “z-order.” You can introduce some overall structure by putting objects into groups and layers, but it's simply not possible to create an element that passes both over and under another object.** | **One thing you've probably noticed about Inkscape throughout the course of this series is that it operates with a stack of objects placed one above another—the “z-order.” You can introduce some overall structure by putting objects into groups and layers, but it's simply not possible to create an element that passes both over and under another object.** | ||
- | Une chose que vous avez probablement remarquée | + | Une chose que vous avez probablement remarquée |
**Because we're mostly interested in creating an artistic result, the solution is simply to put the object on top, and then remove the part that would be hidden behind our second object. One way to remove the hidden part is to edit the paths that make up our problem object, perhaps using Boolean operations to cut out sections. But what if the object is complex, such as a group of many individual elements that would each have to be cut independently? | **Because we're mostly interested in creating an artistic result, the solution is simply to put the object on top, and then remove the part that would be hidden behind our second object. One way to remove the hidden part is to edit the paths that make up our problem object, perhaps using Boolean operations to cut out sections. But what if the object is complex, such as a group of many individual elements that would each have to be cut independently? | ||
- | Parce que nous sommes surtout intéressés à la création d'un résultat artistique, la solution est tout simplement de mettre l' | + | Parce que nous sommes surtout intéressés à la création d'un résultat artistique, la solution est tout simplement de mettre l' |
**As an example let's resurrect the snowman from earlier in this series, and give him a scarf. We could do this simply by drawing the front part of the scarf onto the snowman, but, in this contrived case, our scarf already has a back section that we need to clip out of the final image.** | **As an example let's resurrect the snowman from earlier in this series, and give him a scarf. We could do this simply by drawing the front part of the scarf onto the snowman, but, in this contrived case, our scarf already has a back section that we need to clip out of the final image.** | ||
+ | |||
+ | À titre d' | ||
**Despite its name, a clip path doesn' | **Despite its name, a clip path doesn' | ||
+ | |||
+ | Malgré son nom, un chemin de découpe n'a pas besoin d' | ||
**Defining a clip path is simple: just draw the path or shape you want, ensuring that it sits higher in the z-order than the object or group you want to clip. Now select both the clip path and the object you wish to clip, and use the “Set Clip” option on the right-click context menu. The Object > Clip > Set menu item has the same effect. Here, I've created an oval on top of the scarf. I usually draw my clipping paths with a bright green stroke and no fill—so that they' | **Defining a clip path is simple: just draw the path or shape you want, ensuring that it sits higher in the z-order than the object or group you want to clip. Now select both the clip path and the object you wish to clip, and use the “Set Clip” option on the right-click context menu. The Object > Clip > Set menu item has the same effect. Here, I've created an oval on top of the scarf. I usually draw my clipping paths with a bright green stroke and no fill—so that they' | ||
+ | |||
+ | Définir un chemin de découpe est simple : il suffit de dessiner le tracé ou une forme que vous voulez, en vous assurant qu'il se trouve plus haut dans l' | ||
**Unfortunately the result of this clip is the opposite of the effect we're looking for. Instead of removing the back of the scarf, we're left with nothing but the back of the scarf!** | **Unfortunately the result of this clip is the opposite of the effect we're looking for. Instead of removing the back of the scarf, we're left with nothing but the back of the scarf!** | ||
+ | |||
+ | Malheureusement, | ||
**Remember, clipping always leaves the content inside the clip path visible, and hides everything outside it. There' | **Remember, clipping always leaves the content inside the clip path visible, and hides everything outside it. There' | ||
+ | |||
+ | Rappelez-vous, | ||
**At first glance this may appear to simply be a rectangle with an oval on top of it, but, in practice, this is now a single complex path. “Complex” simply means that it's made up of separate sub-paths. The rectangle is one sub-path, and the oval is a second sub-path, but the whole object is still considered to be a single path and can therefore be used for clipping. Once again, only the area inside the path will remain, but in this case “inside” consists of the space between the oval and the rectangle; “outside” is anything beyond the rectangle, or within the oval. Try setting a fill if the difference between inside and outside isn't clear. Clipping with this complex path gets us much closer to our desired result.** | **At first glance this may appear to simply be a rectangle with an oval on top of it, but, in practice, this is now a single complex path. “Complex” simply means that it's made up of separate sub-paths. The rectangle is one sub-path, and the oval is a second sub-path, but the whole object is still considered to be a single path and can therefore be used for clipping. Once again, only the area inside the path will remain, but in this case “inside” consists of the space between the oval and the rectangle; “outside” is anything beyond the rectangle, or within the oval. Try setting a fill if the difference between inside and outside isn't clear. Clipping with this complex path gets us much closer to our desired result.** | ||
+ | |||
+ | À première vue, cela peut sembler être simplement un rectangle avec un ovale par-dessus, mais, en pratique, c'est maintenant un chemin unique et complexe. « Complexe » signifie simplement qu'il est constitué de sous-chemins séparés. Le rectangle est un sous-chemin et l' | ||
**Remember, this is a purely visual effect. The original scarf remains the same, it's just that parts of it are not being drawn. You can undo the effect at any time by selecting a clipped object then choosing Release Clip from the context menu, or Object > Clip > Release from the main menu bar. This will return the object to its normal appearance, and also make the clipping path visible again.** | **Remember, this is a purely visual effect. The original scarf remains the same, it's just that parts of it are not being drawn. You can undo the effect at any time by selecting a clipped object then choosing Release Clip from the context menu, or Object > Clip > Release from the main menu bar. This will return the object to its normal appearance, and also make the clipping path visible again.** | ||
- | ** | + | |
- | If we add the scarf to the snowman you can see that we're close to the effect we're looking for, but there are still parts of the scarf that are being drawn in front of the character' | + | Rappelez-vous, |
- | ** | + | |
+ | **If we add the scarf to the snowman you can see that we're close to the effect we're looking for, but there are still parts of the scarf that are being drawn in front of the character' | ||
+ | |||
+ | Si l'on ajoute l' | ||
**The problem is that the clip path we've used was just an approximation, | **The problem is that the clip path we've used was just an approximation, | ||
- | **To switch to editing mode, you have to select the clipped object (as usual keep an eye on the status bar where a clipped object will be described as such), then switch to the node tool—using the icon on the tool palette or by pressing “n” or F2. You should now see your clipping path rendered as a single pixel green path, regardless of the color or thickness of the original path. The green color in this mode is the reason I choose bright green when drawing my path in the first place—it helps to reinforce the mental link between green paths and clipping. If you don't see the green path, make sure the “Show clipping path(s) of selected object(s)” button (in the tool control palette) is active. | + | Le problème est que le chemin de découpe que nous avons utilisé était juste une approximation et doit être modifié pour mieux correspondre à la partie que l'on veut cacher. Dans les versions antérieures d' |
- | ** | + | |
- | **From this point you can just edit the path using the node tools that were described in Part 6. You may find it easier to reduce the opacity of your clipped object so that you can see how your clipping path relates to the objects behind. The changes to the clipping path will be applied live, so you can see the result as you work. Once you've finished editing, return your object' | + | **To switch to editing mode, you have to select the clipped object (as usual keep an eye on the status bar where a clipped object will be described as such), then switch to the node tool—using the icon on the tool palette or by pressing “n” or F2. You should now see your clipping path rendered as a single pixel green path, regardless of the color or thickness of the original path. The green color in this mode is the reason I choose bright green when drawing my path in the first place—it helps to reinforce the mental link between green paths and clipping. If you don't see the green path, make sure the “Show clipping path(s) of selected object(s)” button (in the tool control palette) is active.** |
- | ** | + | |
+ | Pour passer en mode édition, vous devez sélectionner l' | ||
+ | |||
+ | **From this point you can just edit the path using the node tools that were described in Part 6. You may find it easier to reduce the opacity of your clipped object so that you can see how your clipping path relates to the objects behind. The changes to the clipping path will be applied live, so you can see the result as you work. Once you've finished editing, return your object' | ||
+ | |||
+ | À partir de là, vous pouvez simplement modifier le chemin en utilisant les outils de nœuds qui ont été décrits dans la partie 6. Vous trouverez peut-être plus facile de réduire l' | ||
**With a little time spent on node editing, you should be able to adjust the clipping path to follow the head of the snowman and make the scarf seem to disappear behind it. | **With a little time spent on node editing, you should be able to adjust the clipping path to follow the head of the snowman and make the scarf seem to disappear behind it. | ||
- | Sometimes you will be able to get away with a simple rectangle or oval as a clipping path, but usually it's worth pressing CTRL-SHIFT-C (or using Path > Object to Path) before setting the clip, simply for the advantage of being able to edit the path without having to un-set then re-set the clip. | + | Sometimes you will be able to get away with a simple rectangle or oval as a clipping path, but usually it's worth pressing CTRL-SHIFT-C (or using Path > Object to Path) before setting the clip, simply for the advantage of being able to edit the path without having to un-set then re-set the clip.** |
- | ** | + | |
- | **Because clipping always results in a hard edge, it can be used to create some effects that would otherwise be very difficult to produce. Wherever you have to stop a blur from spilling over an edge, clipping can provide a solution. Consider something like a semicircle which should only be blurred on the curved edge and cut cleanly on the straight edge. Without clipping this would be a very difficult image to create. | + | En passant un peu de temps sur la correction des nœuds, vous devriez être en mesure d' |
- | ** | + | |
- | **The ability to cut out parts of a blurred object can lead to some particularly interesting effects when used with text. For each of these examples, I've created two copies of a text object. One of them is blurred, whilst the other has been converted to a path and used to clip the blurred version. Different arrangements of clip path, blur, text, background and color choices can produce a variety of results. | + | Parfois, vous serez en mesure de vous en tirer avec un simple rectangle ou un ovale comme chemin de découpe, mais le plus souvent il vaut mieux appuyer sur Ctrl-Maj-C (ou utiliser le menu Chemin > Objet en chemin) avant de définir la découpe, simplement pour pouvoir modifier le chemin d' |
- | ** | + | |
+ | **Because clipping always results in a hard edge, it can be used to create some effects that would otherwise be very difficult to produce. Wherever you have to stop a blur from spilling over an edge, clipping can provide a solution. Consider something like a semicircle which should only be blurred on the curved edge and cut cleanly on the straight edge. Without clipping this would be a very difficult image to create.** | ||
+ | |||
+ | Parce que la découpe se traduit toujours par un bord dur, elle peut être utilisée pour créer des effets qui seraient autrement très difficiles à produire. Partout où vous devez arrêter le débordement d'un effet de flou, le mode découpe peut fournir une solution. Pensez à quelque chose comme un demi-cercle qui ne devrait être flou que sur le bord incurvé et proposer une coupe nette sur le bord droit. Sans une découpe ce serait une image très difficile à créer. | ||
+ | |||
+ | **The ability to cut out parts of a blurred object can lead to some particularly interesting effects when used with text. For each of these examples, I've created two copies of a text object. One of them is blurred, whilst the other has been converted to a path and used to clip the blurred version. Different arrangements of clip path, blur, text, background and color choices can produce a variety of results.** | ||
+ | |||
+ | La possibilité de découper des parties d'un objet flou peut conduire à des effets particulièrement intéressants lorsqu' | ||
**Clipping can also be used to work around the limited selection of gradient types. Inkscape follows the SVG standard in supporting only linear and radial gradients, but other types can often be emulated through careful use of blurred objects and clip paths. In this example, a few blurred segments and a donut-shaped clipping path makes an acceptable substitute for a conical gradient when drawing a CD. | **Clipping can also be used to work around the limited selection of gradient types. Inkscape follows the SVG standard in supporting only linear and radial gradients, but other types can often be emulated through careful use of blurred objects and clip paths. In this example, a few blurred segments and a donut-shaped clipping path makes an acceptable substitute for a conical gradient when drawing a CD. | ||
** | ** | ||
+ | |||
+ | La découpe peut aussi être utilisée pour contourner la sélection limitée de types de dégradé. Suivant le standard SVG, Inkscape ne supporte que les dégradés linéaires et radiaux, mais d' | ||
+ | |||
**Although clipping has many uses, and is a technique that's well worth getting to grips with, sometimes you need a little more subtlety than the hard edges it creates. Next time, we'll look at masking—a related technique that lets you fade objects out gradually, rather than just stopping them dead at the edge of a path.** | **Although clipping has many uses, and is a technique that's well worth getting to grips with, sometimes you need a little more subtlety than the hard edges it creates. Next time, we'll look at masking—a related technique that lets you fade objects out gradually, rather than just stopping them dead at the edge of a path.** | ||
+ | |||
+ | Bien que la découpe ait de nombreuses usages et soit une technique avec laquelle il vaille bien la peine de se familiariser, |
issue73/inkscape.1380657037.txt.gz · Dernière modification : 2013/10/01 21:50 de fcm_-_ekel