issue185: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 | ||
issue185:inkscape [2022/10/03 07:08] – d52fr | issue185:inkscape [2022/10/05 17:29] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 6: | Ligne 6: | ||
But let’s start with a quick definition: the “interactive” mock-ups I’m referring to here are little more than a series of static images containing clickable regions that let you navigate between them. If you were mocking up a series of dialog boxes to form a “wizard” type of interface, you could use this extension to detect a click on the “forward” and “back” buttons in your images. Each click would switch to another image in the sequence, allowing you to demonstrate how your potential user interface might work before you actually start to code it.** | But let’s start with a quick definition: the “interactive” mock-ups I’m referring to here are little more than a series of static images containing clickable regions that let you navigate between them. If you were mocking up a series of dialog boxes to form a “wizard” type of interface, you could use this extension to detect a click on the “forward” and “back” buttons in your images. Each click would switch to another image in the sequence, allowing you to demonstrate how your potential user interface might work before you actually start to code it.** | ||
+ | |||
+ | Maquette Web interactive est la seule nouvelle extension arrivée avec la version 1.0 dont je vais parler dans cette série. Mais ce que je pensais initialement être un sujet simple à couvrir a soulevé quelques questions et problèmes qui vont étendre ce sujet à plus d'un article. Pour commencer, jetons un coup d'œil à cette extension, ce qu' | ||
+ | |||
+ | Web > Maquette Web interactive | ||
+ | |||
+ | Cette extension est destinée à vous permettre d' | ||
+ | |||
+ | Mais commençons par une définition rapide : les maquettes « interactives » auxquelles je fais référence ici ne sont guère plus qu'une série d' | ||
**Another example is when mocking up a website. Perhaps you’ve got a series of images, one for each page in the final site, created using a design tool or from a scanned sketch, but not yet turned into actual HTML code. Using this extension, you could combine those images into a working demonstration of how the page might operate, complete with clickable menus and links for moving between the different pages. | **Another example is when mocking up a website. Perhaps you’ve got a series of images, one for each page in the final site, created using a design tool or from a scanned sketch, but not yet turned into actual HTML code. Using this extension, you could combine those images into a working demonstration of how the page might operate, complete with clickable menus and links for moving between the different pages. | ||
Ligne 16: | Ligne 24: | ||
Scale x: 1.0 | Scale x: 1.0 | ||
Viewbox x, y, width, height: 0, 0, 1920, 1080 (these should be set automatically)** | Viewbox x, y, width, height: 0, 0, 1920, 1080 (these should be set automatically)** | ||
+ | |||
+ | Un autre exemple est celui de la création d'un site Web. Vous disposez peut-être d'une série d' | ||
+ | |||
+ | Je vais utiliser ce dernier exemple pour vous montrer comment fonctionne cette extension, en créant un site Web très simple de trois pages. Assurez-vous de bien comprendre que cette approche pourrait être utilisée pour vous permettre de lier n' | ||
+ | |||
+ | Commençons par la page d' | ||
+ | Unités d' | ||
+ | Taille de la page : Vidéo HD 1080p (1920 × 1080px) | ||
+ | Échelle x : 1.0 | ||
+ | Boîte de visualisation x, y, largeur, hauteur : 0, 0, 1920, 1080 (ces paramètres devraient être définis automatiquement). | ||
+ | |||
**The last two items aren’t so important, but ensuring we have a scale value of 1.0 means that we can use specific pixel dimensions in our page design, since there’s a 1:1 mapping between each pixel in our drawing, and the corresponding pixel on-screen once the page is rendered by the browser. | **The last two items aren’t so important, but ensuring we have a scale value of 1.0 means that we can use specific pixel dimensions in our page design, since there’s a 1:1 mapping between each pixel in our drawing, and the corresponding pixel on-screen once the page is rendered by the browser. | ||
Ligne 24: | Ligne 43: | ||
This is where things start to get a little tricky. We need our new page to have the same dimensions as the first one. If we were creating these as completely separate files, that would be simple enough - just create a new document with the same properties as the first. In practice, I’d probably just use File > Save As… on the first document, then edit the content to suit, but either approach would create multiple files, each with the same basic page properties. But this extension doesn’t link between separate documents, so that approach is no good.** | This is where things start to get a little tricky. We need our new page to have the same dimensions as the first one. If we were creating these as completely separate files, that would be simple enough - just create a new document with the same properties as the first. In practice, I’d probably just use File > Save As… on the first document, then edit the content to suit, but either approach would create multiple files, each with the same basic page properties. But this extension doesn’t link between separate documents, so that approach is no good.** | ||
+ | |||
+ | Les deux derniers éléments ne sont pas si importants, mais le fait de s' | ||
+ | |||
+ | Nous allons maintenant ajouter du contenu à la page, en commençant par une page d' | ||
+ | |||
+ | L' | ||
+ | |||
+ | C'est là que les choses commencent à se compliquer. Notre nouvelle page doit avoir les mêmes dimensions que la première. Si nous les créions en tant que fichiers complètement séparés, ce serait assez simple - il suffirait de créer un nouveau document avec les mêmes propriétés que le premier. En pratique, je me contenterais probablement d' | ||
+ | |||
**Another sensible method would be to create each image on a separate layer. That way all the images share the same document properties, by definition. But this extension doesn’t work with layers, either. | **Another sensible method would be to create each image on a separate layer. That way all the images share the same document properties, by definition. But this extension doesn’t work with layers, either. | ||
Ligne 30: | Ligne 58: | ||
I find that the easiest way to do this is to enable the snap-to-page option and then draw a rectangle from the top-left corner of the page to the bottom-right. Alternatively, | I find that the easiest way to do this is to enable the snap-to-page option and then draw a rectangle from the top-left corner of the page to the bottom-right. Alternatively, | ||
+ | |||
+ | Une autre méthode judicieuse consisterait à créer chaque image sur un calque distinct. De cette façon, toutes les images partagent les mêmes propriétés du document, par définition. Mais cette extension ne fonctionne pas non plus avec les calques. | ||
+ | |||
+ | Ce qu' | ||
+ | |||
+ | Le moyen le plus simple d'y parvenir est d' | ||
+ | |||
**Now you can draw the content of each image within the confines of its rectangle. As you are likely to need some sort of background color in your mock-up (even if that color is only white), I suggest giving each rectangle a solid fill and then locking it, or the layer it lives on, to avoid it being accidentally moved when drawing on top of it. | **Now you can draw the content of each image within the confines of its rectangle. As you are likely to need some sort of background color in your mock-up (even if that color is only white), I suggest giving each rectangle a solid fill and then locking it, or the layer it lives on, to avoid it being accidentally moved when drawing on top of it. | ||
Ligne 38: | Ligne 73: | ||
As you can see, there’s nothing but a Help tab and an “Action” pop-up. The latter offers various ways in which interacting with the first element in your selection will switch the viewBox to point to the second element in your selection. Most of the time you will probably want to leave this set as “click”. In almost all cases, therefore, there’s nothing for you to do here but to click on the “Apply” button and close the dialog.** | As you can see, there’s nothing but a Help tab and an “Action” pop-up. The latter offers various ways in which interacting with the first element in your selection will switch the viewBox to point to the second element in your selection. Most of the time you will probably want to leave this set as “click”. In almost all cases, therefore, there’s nothing for you to do here but to click on the “Apply” button and close the dialog.** | ||
+ | |||
+ | Vous pouvez maintenant dessiner le contenu de chaque image dans les limites de son rectangle. Comme vous aurez probablement besoin d'une couleur d' | ||
+ | |||
+ | En suivant cette approche, la sélection de pages de ma maquette de site Web ressemble à l' | ||
+ | |||
+ | Maintenant que nous avons quelques pages en place, nous pouvons commencer à ajouter un peu d' | ||
+ | |||
+ | Comme vous pouvez le constater, il n'y a rien d' | ||
+ | |||
**Nothing will have changed visibly in your page, but the extension has added some JavaScript to the first element in your selection. Open the Object > Object Properties dialog and expand the “Interactivity” section; you’ll notice a small piece of JavaScript has been added to one of the fields (you may also notice that the list of fields available in this dialog maps suspiciously closely to the options in the pop-up within the extension dialog). | **Nothing will have changed visibly in your page, but the extension has added some JavaScript to the first element in your selection. Open the Object > Object Properties dialog and expand the “Interactivity” section; you’ll notice a small piece of JavaScript has been added to one of the fields (you may also notice that the list of fields available in this dialog maps suspiciously closely to the options in the pop-up within the extension dialog). | ||
Ligne 44: | Ligne 88: | ||
When the page loads in the browser you’ll probably notice that some of it is cut-off.** | When the page loads in the browser you’ll probably notice that some of it is cut-off.** | ||
+ | |||
+ | Rien n'aura visiblement changé dans votre page, mais l' | ||
+ | |||
+ | J' | ||
+ | |||
+ | Lorsque la page se charge dans le navigateur, vous remarquerez probablement qu'une partie de celle-ci est coupée. | ||
+ | |||
**This might seem a little strange, given that we’re working with a scalable image, but it boils down to the fact that we set a specific width and height for the file, in pixels, in the Document Properties dialog. You may recall that the intention was for it to fit the dimensions of an HD screen when the browser is switched to fullscreen mode. Press F11, therefore, and our mock web page fits perfectly! | **This might seem a little strange, given that we’re working with a scalable image, but it boils down to the fact that we set a specific width and height for the file, in pixels, in the Document Properties dialog. You may recall that the intention was for it to fit the dimensions of an HD screen when the browser is switched to fullscreen mode. Press F11, therefore, and our mock web page fits perfectly! | ||
Ligne 50: | Ligne 101: | ||
Let’s return to Inkscape and fix some of these issues by adding more links. First we need to add a connection going from the “About” link on the Contacts page to the rectangle of the About page itself, in just the same way that we did with the previous link from the Home page. With that in place it’s now possible to jump to the About page from either of the others. As this shows, it’s okay for the same element to be the target of several different links.** | Let’s return to Inkscape and fix some of these issues by adding more links. First we need to add a connection going from the “About” link on the Contacts page to the rectangle of the About page itself, in just the same way that we did with the previous link from the Home page. With that in place it’s now possible to jump to the About page from either of the others. As this shows, it’s okay for the same element to be the target of several different links.** | ||
+ | |||
+ | Cela peut sembler un peu étrange, étant donné que nous travaillons avec une image évolutive, mais cela revient à dire que nous définissons une largeur et une hauteur spécifiques pour le fichier, en pixels, dans la boîte de dialogue Propriétés du document. Vous vous souvenez peut-être que l' | ||
+ | |||
+ | Nous pouvons maintenant tester l' | ||
+ | |||
+ | Revenons à Inkscape et corrigeons certains de ces problèmes en ajoutant d' | ||
+ | |||
**We also want both the Home and About pages to link to the Contacts page. We could connect each link item individually, | **We also want both the Home and About pages to link to the Contacts page. We could connect each link item individually, | ||
Ligne 56: | Ligne 114: | ||
With that done, all that remains is to save the file, reload it in the browser, switch to full-screen (F11) if needed, and click the fake links to switch between all three pages of our mocked-up website. Pretty cool stuff, right?** | With that done, all that remains is to save the file, reload it in the browser, switch to full-screen (F11) if needed, and click the fake links to switch between all three pages of our mocked-up website. Pretty cool stuff, right?** | ||
+ | |||
+ | Nous souhaitons également que les deux pages Accueil et À propos soient liées à la page Contacts. Nous pourrions connecter chaque élément de lien individuellement, | ||
+ | |||
+ | Une fois les trois éléments sélectionnés, | ||
+ | |||
+ | Cela fait, il ne reste plus qu'à enregistrer le fichier, à le recharger dans le navigateur, à passer en plein écran (F11) si nécessaire, | ||
+ | |||
**Of course this is all well and good if you’ve created your mock-ups within Inkscape. You can easily select the individual objects that are to act as triggers. But what if your “page” is actually a bitmap image, exported from a paint program or scanned from a sketch on a napkin? Or it might be a more complex Inkscape image, with your objects nested deeply inside a range of groups, making it tricky to select both the trigger and the target element at the same time. In those cases, there’s a simple little trick that can help you out: just draw fresh elements over the top of your page which will act as your triggers and/or destinations. | **Of course this is all well and good if you’ve created your mock-ups within Inkscape. You can easily select the individual objects that are to act as triggers. But what if your “page” is actually a bitmap image, exported from a paint program or scanned from a sketch on a napkin? Or it might be a more complex Inkscape image, with your objects nested deeply inside a range of groups, making it tricky to select both the trigger and the target element at the same time. In those cases, there’s a simple little trick that can help you out: just draw fresh elements over the top of your page which will act as your triggers and/or destinations. | ||
Start with a simple shape with a colored fill that covers your trigger item completely. It doesn’t even need to be a rectangle, if your design calls for something more complex. Give it a little opacity so you can see what you’re doing as you start to add more of them to cater for every possible link in your mock-up. Use the extension to add the interactivity then, just before saving, set the opacity way down on these new shapes. You can set it to zero to ensure they’re not visible on the page at all, but that does make it trickier to re-select them for editing later. A useful trick is to set their opacity to 1: this is usually so transparent that there’s no hint of them on the final page, but they’re much easier to select in Inkscape itself if they need to be modified in future.** | Start with a simple shape with a colored fill that covers your trigger item completely. It doesn’t even need to be a rectangle, if your design calls for something more complex. Give it a little opacity so you can see what you’re doing as you start to add more of them to cater for every possible link in your mock-up. Use the extension to add the interactivity then, just before saving, set the opacity way down on these new shapes. You can set it to zero to ensure they’re not visible on the page at all, but that does make it trickier to re-select them for editing later. A useful trick is to set their opacity to 1: this is usually so transparent that there’s no hint of them on the final page, but they’re much easier to select in Inkscape itself if they need to be modified in future.** | ||
+ | |||
+ | Bien sûr, tout cela est très bien si vous avez créé vos maquettes dans Inkscape. Vous pouvez facilement sélectionner les objets individuels qui serviront de déclencheurs. Mais qu'en est-il si votre « page » est en fait une image bitmap, exportée d'un programme de peinture ou scannée à partir d'une esquisse sur une serviette de table ? Ou bien il s'agit d'une image Inkscape plus complexe, avec des objets imbriqués profondément dans une série de groupes, ce qui rend difficile la sélection simultanée du déclencheur et de l' | ||
+ | |||
+ | Commencez par une forme simple avec un remplissage coloré qui couvre complètement votre élément déclencheur. Il n'est même pas nécessaire que ce soit un rectangle, si votre conception exige quelque chose de plus complexe. Donnez-lui un peu d' | ||
+ | |||
**With this approach, it’s fairly trivial to turn even a series of pencil sketches into something that’s interactive enough to work as a proof-of-concept demo. Want to improve the UI of your favourite Open Source application? | **With this approach, it’s fairly trivial to turn even a series of pencil sketches into something that’s interactive enough to work as a proof-of-concept demo. Want to improve the UI of your favourite Open Source application? | ||
I’m sure you can see how this simple extension makes it very quick and easy to create interactive mock-ups. For a lot of situations, this may be all that you need, but next time I’ll take a look at some of the problems presented by such a simple system, and how they can be addressed with just a little extra effort.** | I’m sure you can see how this simple extension makes it very quick and easy to create interactive mock-ups. For a lot of situations, this may be all that you need, but next time I’ll take a look at some of the problems presented by such a simple system, and how they can be addressed with just a little extra effort.** | ||
+ | |||
+ | Avec cette approche, il est plutôt facile de transformer une série de croquis au crayon en quelque chose d' | ||
+ | |||
+ | Je suis sûr que vous pouvez voir comment cette simple extension rend très rapide et facile la création de maquettes interactives. Dans de nombreuses situations, c'est peut-être tout ce dont vous avez besoin, mais, la prochaine fois, j' | ||
issue185/inkscape.1664773712.txt.gz · Dernière modification : 2022/10/03 07:08 de d52fr