Outils pour utilisateurs

Outils du site


issue94:inkscape

Ceci est une ancienne révision du document !


Table des matières

1

Breaking News: Since the previous instalment of this series, the long awaited 0.91 version of Inkscape has finally been released. Whilst it has some exciting new features, there's nothing that radically affects any of the subjects I've covered so far, so all the previous articles still apply. I'll delve into some of the 0.91 additions in future tutorials, but, for now, let's carry on with the Tiled Clones dialog, which hasn't really changed with the new release… Last time, we quickly skipped over the first tab of the Tiled Clones dialog, leaving the pop-up menu on the “P1” setting, then spent the rest of the article looking at the Shift tab. The key thing is understanding how each column of controls applies to the rows and columns of clones that you define at the bottom of the dialog. If you're not entirely clear about that, now's the time to go back and revise because the next four tabs are all based on the same type of arrangement.

2

Before we move on to the Scale tab, once again you'll need an object or group to clone, and once again I'll be using a simple rounded rectangle. You should also click on the Reset button in the dialog to ensure that you haven't got any odd values hanging around in the Shift tab that will confuse the results. Click the Create button at this point and you should see the same simple array of objects that we started with last time, which will confirm that all the controls are set to sensible base values. Now let's take a first foray into the Scale tab (shown right). The layout is almost identical to the Shift tab, so you should be able to work out what most of the fields are for. The Shift X and Y rows have been replaced with Scale X and Scale Y, allowing you to set the amount by which the width and height of your clones are changed for each row and column – plus a random amount if you choose. Clones that have been scaled in this way are exactly the same as if you had manually scaled them using the normal resize handles. As usual, the values are percentages that are relative to the parent's bounding box dimensions. In this example, I've set the values to reduce the width of the rectangle by 40% and the height by 20% for each row.

3

The Exponent field lets you determine whether the amount of X and Y scale should be the same for each row or column, or whether it should increase or decrease exponentially. The Base fields are used in conjunction with the Rotation tab to create logarithmic spirals, but I've never really had much luck with the technique. Finally, the Alternate and Cumulate checkboxes work the same way as for the Shift tab. The former allows the Scale factor to be applied as alternating positive and negative values for each row or column, whereas the latter causes the scale factor to be repeatedly added for each row or column, rather than just using the same value for every one. You can, of course, scale up as well as down using this dialog simply by setting positive values for the Scale X and Scale Y fields. If you do this you'll see that the clones immediately start to overlap each other. Here I've set both the X and Y scale factors to +10% for both the rows and columns (in other words, I've put 10 into the four boxes at the top left of the dialog). I've used a shape with stroke and no fill to make it a little clearer what's happening.

4

If you don't want your scaled clones to overlap like this, you simply have to give them a little more breathing room using the Shift tab. This is a key point of the Tiled Clones dialog: you can combine options from multiple tabs in order to create the arrangement you want – although it's also easy to create arrangements that quite literally spiral out of control! If your experiments take you too far off the beaten track, don't forget the Reset button. Moving onto the Rotation tab, I'm not even going to describe each field because, by now, you should be seeing a common theme across the dialog. Instead I'll just present the following screenshot, and ask you to think about how those values of 9° for each row and column have accumulated into a 45° rotation of the bottom-right rectangle.

5

At first the rotate tab seems fairly plain and innocuous. It does what it suggests, rotating each clone according to its row and column position, and that's about it. But there's one vital parameter required for rotating that doesn't even get a mention in that dialog: the center of rotation. In the previous example I used the parent's default center of rotation, at the middle of the bounding box. But you can move it, as described way back in part 1 of this series: just select an object then click it a second time to bring up the rotate and skew handles, then drag the small cross that marks the center of rotation to some other position. If you want to return it to the default position, just SHIFT-click on it. With the center of rotation moved outside our parent object, the previous rotations become a little more interesting. Notice how the arrangement as a whole is starting to curve? We can take advantage of this to create circles and arcs, even though the first tab still claims we're performing a “simple translation”. By changing the parameters at the bottom of the dialog to just produce a single row of clones, with a center of rotation outside the parent object, you can create a circular array. Let's give it a try: set the “Rows, columns” fields to 1×12; adjust the center of rotation to drag it down below your object; set the rotation per column to 30°; finally either check the Per column “Exclude tile” box in the Shift tab, or set the Per column Shift X amount to -100%, in order to counteract the default behaviour of placing each column further along the X axis. Click the Create button and you should have a circular arrangement of clones.

6

By also putting values into the Scale X and Scale Y fields, it's possible to create spirals in this way. Unfortunately the use of these fields will, of course, alter the size of the clones – I've yet to find a method for creating spirals of identically sized objects using this dialog. This is where the Base fields should allow you to create logarithmic spirals that grow (or shrink) exponentially, but all they seem to do for me is to distort the clones as they progress around the spiral, so I tend to leave them as 0. Feel free to experiment on your own, though, to see if you can make them perform their magic. Finally for this instalment, the Blur and Opacity tab should be fairly easy to understand. Tweaking the values in here is the equivalent of setting the Blur and Opacity sliders in the Fill and Stroke dialog for each clone. It's worth noting that any transparency in an object can cause Inkscape and other SVG renderers to slow down a little, as they have to calculate the effect that the pixels behind the object will have on the overall image. Blur has an even more significant effect on rendering speed, with larger values requiring ever more intense calculations. It's easy to add too much blur via this dialog, especially when creating a lot of clones, so you should probably start with very small values and work your way up, rather than just going straight for multi-digit numbers.

7

Be aware that adding blur to clones in this way will actually create a new Gaussian Blur filter for each clone. Filters are a subject for another article, but suffice to say that it's easy to bloat your file with numerous redundant filters, especially when you're experimenting with several different values in this dialog. Using File > Vacuum Defs (renamed as File > Clean Up Document in 0.91) can often remove any obsolete filters, but it's not always 100% successful. There are no “Cumulative” checkboxes on this tab because these values always add up: if you put 5.0 into the Per row Fade out field, the first row will be completely opaque, the second row will have 5% transparency applied, the third will have 10%, and so on. Applying a little blur and fade to our previous spiral gives this result. Next time we'll continue our investigation of the Tiled Clones dialog by looking at the last two tabs: Colour and Trace.

issue94/inkscape.1427992621.txt.gz · Dernière modification : 2015/04/02 18:37 de fredphil91