issue88:inkscape
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue88:inkscape [2014/10/30 16:42] – créée andre_domenech | issue88:inkscape [2015/01/21 14:56] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | In this article, I'm going to start looking at clones in Inkscape. Clones can easily be dismissed as a minor feature, but, with a few tricks, you can use them to perform marvellous feats that make them worthy of several articles just to cover the basics. | + | **In this article, I'm going to start looking at clones in Inkscape. Clones can easily be dismissed as a minor feature, but, with a few tricks, you can use them to perform marvellous feats that make them worthy of several articles just to cover the basics. |
- | At the simplest level, a clone is nothing more than a duplicate of an Inkscape object that maintains a link to the original. Changes to the original are automatically propagated to the clone, making them ideal when you need several identical objects in an image. Creating a clone is as simple as selecting the object and using the Edit > Clone > Create Clone menu entry, or just pressing the Alt-D keyboard shortcut. The new clone will be created directly on top of the original object, and will be selected automatically so that you can immediately move it to somewhere else. | + | At the simplest level, a clone is nothing more than a duplicate of an Inkscape object that maintains a link to the original. Changes to the original are automatically propagated to the clone, making them ideal when you need several identical objects in an image. Creating a clone is as simple as selecting the object and using the Edit > Clone > Create Clone menu entry, or just pressing the Alt-D keyboard shortcut. The new clone will be created directly on top of the original object, and will be selected automatically so that you can immediately move it to somewhere else.** |
- | With a clone selected, the Edit > Clone > Select Original menu item (or Shift-D shortcut) will select the original object with which the clone is linked – its “parent” if you like. This now gives us a collection of related keyboard shortcuts that are well worth memorising to speed up your work with Inkscape: | + | Dans cet article, je vais commencer à regarder les clones dans Inkscape. Les clones peuvent être facilement ignorés car considérés comme des fonctionnalités mineures, mais, avec quelques astuces, vous pouvez les utiliser pour donner vie à de merveilleuses fonctionnalités qui mériteraient plusieurs articles juste pour en couvrir les bases. |
+ | |||
+ | Au niveau le plus simple, un clone n'est rien d' | ||
+ | |||
+ | **With a clone selected, the Edit > Clone > Select Original menu item (or Shift-D shortcut) will select the original object with which the clone is linked – its “parent” if you like. This now gives us a collection of related keyboard shortcuts that are well worth memorising to speed up your work with Inkscape: | ||
Ctrl-X - Cut to clipboard | Ctrl-X - Cut to clipboard | ||
Ligne 13: | Ligne 17: | ||
Shift-D - Select Original | Shift-D - Select Original | ||
- | Initially the Paste In Place option seems a little redundant, given that the Duplicate command appears to achieve the same result. The difference is that Paste In Place also works between layers, and even between Inkscape documents, so you can copy or cut from one drawing' | + | Initially the Paste In Place option seems a little redundant, given that the Duplicate command appears to achieve the same result. The difference is that Paste In Place also works between layers, and even between Inkscape documents, so you can copy or cut from one drawing' |
- | So much for the theory, let's create a duplicate and a clone and see the difference between them. For notational purposes, I'm going to use a solid arrow pointing from the parent | + | Le clone étant sélectionné, l'entrée de menu Édition > Clone > Sélectionner l' |
+ | Ctrl-X - Couper vers le presse-papier. | ||
+ | Ctrl-C - Copier vers le presse-papier. | ||
+ | Ctrl-V - Coller depuis le presse-papier (sur la position de la souris). | ||
+ | Ctrl-Alt-V - Coller sur place (à la position de l' | ||
+ | Ctrl-D - Dupliquer (copier-coller sur place). | ||
+ | Alt-D - Cloner (une duplication reliée). | ||
+ | Maj-D - Sélectionner l' | ||
- | As you might expect, all three objects look the same. The difference only becomes apparent when the parent object is modified in some way – such as changing it's fill and stroke, or altering the roundedness of the corners. | + | A première vue, l' |
+ | **So much for the theory, let's create a duplicate and a clone and see the difference between them. For notational purposes, I'm going to use a solid arrow pointing from the parent object to the duplicate, and a dashed arrow pointing from the parent object to the clone. With this notation the “Select Original” command always follows back from the tip of a dashed arrow to its source. Here's a simple parent object with a single duplicate and a single clone. | ||
- | Our duplicated object, which maintains no link to the parent, remains unaffected. The clone, however, is immediately updated to reflect the changes to its parent object. That makes it useful for creating absolutely identical objects – hence the term “clones” – but, as in real life, it's possible for Inkscape' | ||
- | It's important to note that these changes are applied after the clone has been synchronised with its parent – you can think of them as being added on to the base attributes of the parent. So the clone's fill and stroke | + | As you might expect, all three objects look the same. The difference only becomes apparent when the parent |
- | One simple but effective use of this feature is to create drop shadows by blurring a clone and reducing its opacity. This is especially beneficial when dealing with text objects as the shadow will automatically adjust to any edits you may make to the text content. | + | C'est assez pour les explications, |
+ | |||
+ | Comme vous pouviez vous y attendre, ces trois objets se ressemblent. La différence ne devient apparente que quand le parent est modifié d'une quelconque façon - telle que changer son contour ou son remplissage ou modifier l' | ||
+ | |||
+ | **Our duplicated object, which maintains no link to the parent, remains unaffected. The clone, however, is immediately updated to reflect the changes to its parent object. That makes it useful for creating absolutely identical objects – hence the term “clones” – but, as in real life, it's possible for Inkscape' | ||
+ | |||
+ | It's important to note that these changes are applied after the clone has been synchronised with its parent – you can think of them as being added on to the base attributes of the parent. So the clone' | ||
+ | |||
+ | Notre objet dupliqué, qui n'a plus de lien avec le parent, reste inchangé. A l' | ||
+ | |||
+ | Il est important de noter que ces changements ont été réalisés après que le clone a été synchronisé avec son parent - considérez qu'ils ont été ajoutés aux attributs de base du parent. Ainsi, les couleurs de contour et de remplissage du clone continueront à changer si celles du parent changent et tout changement dans la rotation, le flou ou l' | ||
+ | |||
+ | **One simple but effective use of this feature is to create drop shadows by blurring a clone and reducing its opacity. This is especially beneficial when dealing with text objects as the shadow will automatically adjust to any edits you may make to the text content. | ||
If a clone is just another type of object, then surely it must be possible to copy and paste it. If that's possible, then what about duplicating it, or even cloning it? The simple answer is that you can do all these things with clones, but the results might not always be what you expect. You can create long chains of relationships – clones of clones of clones... of clones of objects – but the cumulative nature of any applied transformations can result in a small tweak to one item having a knock-on effect all the way down the chain. | If a clone is just another type of object, then surely it must be possible to copy and paste it. If that's possible, then what about duplicating it, or even cloning it? The simple answer is that you can do all these things with clones, but the results might not always be what you expect. You can create long chains of relationships – clones of clones of clones... of clones of objects – but the cumulative nature of any applied transformations can result in a small tweak to one item having a knock-on effect all the way down the chain. | ||
- | To keep things simple, I'll just look at a basic three object chain where a grandparent is duplicated or cloned to form a parent which is, in turn, duplicated or cloned to create a child. I've drawn all the possible combinations, | + | To keep things simple, I'll just look at a basic three object chain where a grandparent is duplicated or cloned to form a parent which is, in turn, duplicated or cloned to create a child. I've drawn all the possible combinations, |
- | (1) is the starting point, our grandparent object. This is duplicated to create (2), and cloned to create (3). Each of those objects is duplicated and cloned to produce the remaining items. The provenance of each object is therefore: | + | Une utilisation simple mais efficace de cette fonctionnalité est la création d'une ombre portée en floutant le clone et en réduisant son opacité. C'est particulièrement bénéfique en traitant des objets textes, car l' |
+ | |||
+ | Si un clone est simplement un autre objet, alors il est sûrement possible de le copier et de le coller. Si c'est possible, alors pourquoi pas le dupliquer ou même le cloner ? Une réponse simple est que vous pouvez faire tout cela avec des clones, mais que le résultat pourrait ne pas être toujours ce que vous attendiez. Vous pouvez créer de longues chaînes relationnelles - clones de clones de clones ... de clones d' | ||
+ | |||
+ | Pour rester simple, je vais juste considérer une chaîne de 3 objets où un grand-parent est dupliqué ou cloné pour obtenir un parent qui, à son tour, est dupliqué ou cloné pour créer un enfant. J'ai dessiné toutes les combinaisons possibles et affecté un nombre à chaque objet ou clone, ce qui facilitera le suivi des opérations. On commence avec le même arrangement de base des objets que dans l' | ||
+ | |||
+ | **(1) is the starting point, our grandparent object. This is duplicated to create (2), and cloned to create (3). Each of those objects is duplicated and cloned to produce the remaining items. The provenance of each object is therefore: | ||
(1) The original grandparent object. | (1) The original grandparent object. | ||
Ligne 41: | Ligne 70: | ||
(7) A clone of a clone of (1) | (7) A clone of a clone of (1) | ||
- | What happens when we modify the attributes of (1)? As before, our duplicated object (2) remains unaffected, so (4) and (5) also appear untouched. The first-level clone (3) changes, as does its clone (7). But what about (6)? That was made as a duplicate, so you might expect it not to change, yet you can clearly see that it does. | + | What happens when we modify the attributes of (1)? As before, our duplicated object (2) remains unaffected, so (4) and (5) also appear untouched. The first-level clone (3) changes, as does its clone (7). But what about (6)? That was made as a duplicate, so you might expect it not to change, yet you can clearly see that it does.** |
- | The thing to bear in mind is that (6) is an exact duplicate of (3) – even down to its linkage to the grandparent object (1), represented by the gray line on the image. You can see, therefore, that a second clone of an object can be created either by cloning the object a second time, or by duplicating an existing clone. The difference is that duplicating a clone will also duplicate any other attributes associated with it, so if you've rotated the clone or added a blur, those effects will be present on the new clone, even though it's linkage goes back to the grandparent object. | + | (1) est le point de départ, notre objet grand-parent. Il est dupliqué pour créer (2) et cloné pour obtenir (3). Chacun de ces objets est dupliqué et cloné pour produire les autres éléments. La provenance de chaque objet est donc : |
+ | |||
+ | (1) l' | ||
+ | (2) Copie de (1). Parent de (4) et (5). | ||
+ | (3) Clone de (1). Parent de (6) et (7). | ||
+ | (4) Copie de copie de (1). | ||
+ | (5) Clone de copie de (1). | ||
+ | (6) Copie de clone de (1). | ||
+ | (7) Clone de clone de (1). | ||
+ | |||
+ | Que se passe-t-il quand nous modifions les attributs de (1) ? Comme précédemment, | ||
+ | |||
+ | **The thing to bear in mind is that (6) is an exact duplicate of (3) – even down to its linkage to the grandparent object (1), represented by the gray line on the image. You can see, therefore, that a second clone of an object can be created either by cloning the object a second time, or by duplicating an existing clone. The difference is that duplicating a clone will also duplicate any other attributes associated with it, so if you've rotated the clone or added a blur, those effects will be present on the new clone, even though it's linkage goes back to the grandparent object. | ||
Now let's look at what happens if we modify (2) and (3). For this example I've rotated them through 45°. | Now let's look at what happens if we modify (2) and (3). For this example I've rotated them through 45°. | ||
- | (4) remains the same, because it has no linkage to any of the other objects. (5) rotates because it's a clone of (2). The linkage between (6) and (1) means that it's not affected by the rotation of (3) – although it would be affected if (1) were to be modified. Finally (7) does rotate because, as a clone of a clone, it's made up of the cumulative effects of all the changes made to both (1) and (3). | + | (4) remains the same, because it has no linkage to any of the other objects. (5) rotates because it's a clone of (2). The linkage between (6) and (1) means that it's not affected by the rotation of (3) – although it would be affected if (1) were to be modified. Finally (7) does rotate because, as a clone of a clone, it's made up of the cumulative effects of all the changes made to both (1) and (3).** |
- | If that's not enough to make your head spin, I'll leave it as an exercise for the reader to consider chains of four or more objects! | + | Il faut garder à l' |
+ | |||
+ | Maintenant, regardons ce qui arrive si nous modifions (2) et (3). Ici, je les ai tourné de 45°. | ||
+ | |||
+ | (4) reste identique, parce qu'il n'a pas de lien avec les autres objets. (5) tourne parce que c'est un clone de (2). Le lien entre (6) et (1) fait qu'il n'est pas modifié par la rotation de (3) - alors qu'il eût été affecté si (1) avait été modifié. Enfin, (7) doit tourner parce qu'en tant que clone de clone, il subit les effets cumulés de tous les changements opérés sur (1) et sur (3). | ||
+ | |||
+ | **If that's not enough to make your head spin, I'll leave it as an exercise for the reader to consider chains of four or more objects! | ||
One good reason for using clones is that they tend to be less resource hungry than the equivalent separate objects. In terms of storage space, a clone is little more than a reference to another part of the SVG content, helping to keep the file size down. This can be particularly useful when you're dealing with complex paths, groups or embedded images. Consider this example that uses a single image and some cloning, rather than embedding three separate images. | One good reason for using clones is that they tend to be less resource hungry than the equivalent separate objects. In terms of storage space, a clone is little more than a reference to another part of the SVG content, helping to keep the file size down. This can be particularly useful when you're dealing with complex paths, groups or embedded images. Consider this example that uses a single image and some cloning, rather than embedding three separate images. | ||
- | The left hand image is the parent in this case. The top right image is the result of cloning the parent, then scaling the clone before applying a clipping path. The bottom right image is the result of cloning the clipped clone and applying a second clipping path to that. The same effect could also have been achieved by clipping a second clone of the parent, but I also wanted to demonstrate that a clone of a clipped or masked object still retains the clipped appearance – note the curved sides of the bottom right image that result from the elliptical clipping path used on the top image. | + | The left hand image is the parent in this case. The top right image is the result of cloning the parent, then scaling the clone before applying a clipping path. The bottom right image is the result of cloning the clipped clone and applying a second clipping path to that. The same effect could also have been achieved by clipping a second clone of the parent, but I also wanted to demonstrate that a clone of a clipped or masked object still retains the clipped appearance – note the curved sides of the bottom right image that result from the elliptical clipping path used on the top image.** |
+ | |||
+ | Si ça ne suffit pas à vous donner le tournis, je vous laisserai faire l' | ||
+ | |||
+ | Une bonne raison d' | ||
+ | |||
+ | Ici, l' | ||
+ | |||
+ | **Although clones can result in substantial space savings, chaining them too deeply can slow Inkscape' | ||
+ | |||
+ | Remember, either clone from the original parent each time (Alt-D), or clone once then duplicate the clone (Ctrl-D). If you're not sure whether you're cloning the original object or an existing clone of it, check the status bar. If it reads “Clone of Clone of Clone...” then you might want to re-think your approach.** | ||
- | Although | + | Bien que les clones |
- | Remember, either clone from the original | + | Souvenez-vous que soit vous clonez chaque fois à partir du parent |
issue88/inkscape.1414683722.txt.gz · Dernière modification : 2014/10/30 16:42 de andre_domenech