La traduzione di questa pagina non è stata ancora completata. Finché non lo sarà, le parti non tradotte saranno visualizzate in inglese.
Indice
BeOS bitmap vs. Haiku vector icons
Icons are attributes
Creating icons with Icon-O-Matic
Path
Shape
Style
Transformer
Saving an icon
Tips & Tricks

icon-o-matic-icon_64.pngIcon-O-Matic

Deskbar:Applicazioni
Percorso:/boot/system/apps/Icon-O-Matic
Impostazioni:~/config/settings/Icon-O-Matic


Prima di passare alla effettiva creazione di icone in Icon-O-Matic, ecco un paio di parole sulle icone di Haiku in generale.

index Le bitmap di BeOS vs. le icone vettoriali di Haiku

Contrariamente a BeOS, Haiku utilizza icone vettoriali al posto delle icone bitmap. È stato sviluppato uno speciale Formato di Icone Vettoriali per Haiku (HVIF) che è altamente ottimizzato per file di piccole dimensioni e per un rendering veloce. Ecco perché la maggior parte delle nostre icone sono molto più piccole di una bitmap o del più ampiamente usato formato SVG. Inoltre, a differenza delle icone bitmap di BeOS, Haiku non si limita a una tavolozza 8 bit (256 colori).
Prendete questa icona del terminale, ad esempio:

BitmapSVGHVIF
i-o-m-terminal-bitmap32 i-o-m-terminal-bitmap16terminal-icon_32terminal-icon_32
1,024 byte
+ 256 byte
7,192 byte 768 byte

Notare che BeOS ha usato due versioni della stessa icona, una di 16x16 e l'altra di 32x32, per ottenere buone visualizzazioni in modalità lista e in modalità visuale icone.

Questo trucco non è necessario con icone vettoriali. Oltre ad occupare solo poche centinaia di byte in un file, le icone vettoriali scalano molto meglio di quelle bitmap. (Nota: BeOS offre solo una visualizzazione 16x16 e una 32x32.)

16x1632x3264x64128x128
Bitmap i-o-m-bitmap16 i-o-m-bitmap32 i-o-m-bitmap64 i-o-m-bitmap128
Vector i-o-m-vector16 i-o-m-vector32 i-o-m-vector64 i-o-m-vector128

index Le icone sono attributi

Le icone sono archiviate come un attributo con i loro file. Tuttavia, ciò non significa che ogni file deve avere questo attributo per apparire con un'icona in una finestra del Tracker: i file di dati ereditano la loro icona dal loro tipo di file. Per cambiare globalmente l'icona del tipo di file utilizzazre le preferenze dei FileType. Se si vuole aggiungere soltanto un'icona speciale per un singolo file, si utilizza invece il FileType Add-On su di essa. Vedere il documento Filetypes per maggiori informazioni.

Essendo un attributo, ne consegue che solo i filesystem che supportano i metadati possono conservare singola icona di un file. Quindi, se si spostano i file da un volume BFS, si consigli di comprimerli in modo da non perdere gli attributi delle icone o di altro tipo.

index Creare icone con Icon-O-Matic

Icon-O-Matic è l'editor di icone di Haiku che può salvare il fle come HVIF, SVG o PNG. L'icona può anche essere collegata direttamente come attributo a un file esistente o esportata come file di risorse o come sorgente utilizzato dagli sviluppatori. Dato che l'applicazione è stata ottimizzata su misura per il formato HVIF, il suo uso riflette il funzionamento interno di questo formato.

Other than your normal vector graphics software, you don't deal with separate objects that each include all their specific properties like path, stroke width, stroke and fill color etc. Rather, you assemble your objects ("shapes") from shared paths and colors ("styles") and set certain properties. This re-using of elements is one secret of HVIF's efficiency. Although that imposes some constraints on the icon designer, there are a few advantages, too.
For example, by re-using a path, several objects can be modified together by manipulating this one path. Think of an object and its shadow. Modifying their shared path will change the object itself and automatically its (maybe slightly distorted/translated) shadow.

Ecco una rapida panoramica della finestra di Icon-O-Matic:

i-o-m-overview.png

Per creare qualsiasi oggetto visibile nella finestra di disegno, è necessaria una forma con un percorso e uno stile. È possibile crearli comodamente tutti insieme o anche uno per volta dal menù Shape. Ogni tipo di oggetto (Percorso, Forma, Transformatore, e Stile) ha un menù sopra la propria lista degli elementi, che offrono vari comandi. Ogni elemento ha alcune opzioni che vengono impostate dal menù Properties.

index Percorso

Un percorso è costituito da diversi punti che sono collegati con linee e curve di Bezier. Per aggiungere o modificare i punti, assicurarsi che il percorso sia selezionato nella lista dei percorsi.

Basta cliccare sulla finestra di disegno per posizionare il primo punto. Nell'atto di posizionare un punto, si decide se la linea risultante sarà dritta o curva: basta cliccare una volta e rilasciare per una linea retta, oppure tenere premuto il tasto del mouse e muoverlo per trascinare le maniglie di una curva di Bezier. Naturalmente, sarà possibile effettuare modifiche in seguito.

i-o-m-path-ab

To get from "A" to "B", you have to transform some points from corner-points to curve-points. That's done by holding ALT while clicking on a point and dragging out the handles. This results in a symmetrical Bezier: the second handle follows the movement of the other. If you need to move the handles independently, again click & drag on a Bezier handle while holding ALT.
Vice versa, to go from Bezier to a corner-point, hold ALT and click on a point.

To move a point, simply click & drag it. To select more than one point, hold down SHIFT and draw a selection rectangle. Selected points are marked with a red border instead of the usual black.
To insert a point into a path you click on the connecting line between two points.
Selected points are deleted by pressing DEL or by clicking on any point while holding CTRL.

Il puntatore del mouse indica le seguenti modalità:

i-o-m-pointer-move-path i-o-m-pointer-insert i-o-m-pointer-add i-o-m-pointer-delete i-o-m-pointer-bezier i-o-m-pointer-select
Move point(s) Insert point Add point Delete point
CTRL
Corner↔Bezier
ALT
Select points
SHIFT

È possibile richiamare un menu contestuale cliccando col tasto destro su un punto o una selezione di punti:

Select allALT ASeleziona tutti i punti del percorso corrente.
TransformTPone tutti i punti selezionati in una casella di trasformazione in modo da poterli muovere, ridimensionare o ruotare contemporaneamente. Funziona come per le forme, descritte più avanti.
SplitDivide i punti selezionati in due, uno sopra all'altro.
FlipRuota i punti selezionati di 180°. Applicabile solamente ai punti Bezier.
RemoveDELElimina i punti selezionati.

Menù percorso

Il menù Path offre poche ovvie voci per Add Rectangle e Add Circle o per Duplicate o Remove un percorso. Qui di seguito sono riportate quelle voci che potrebbero necessitare di qualche spiegazione in più:

ReverseIf your path isn't "closed" (see Path Properties below), a click into the canvas always creates a new point, connecting it with the last one. "Reverse" will reverse this order and your new point will connect to original start point instead.
Clean UpMost useful with imported SVGs, this function will remove redundant points.
Rotate Indices RightALT RPractically, this rotates the opening of a path. It's best seen when using a not-closed path with a style and a shape with a stroke transformer. Now, if your path looks like a ⊂ it will rotate like this: ⊂ ∩ ⊃ ∪.
Rotate Indices LeftALT SHIFT RFa la stessa cosa nell'altra direzione.

Proprietà del percorso

Le Properties in basso a sinistra della finestra mostrano tutte le impostazioni disponibili per gli oggetti correntemente selezionati. Un percorso ne ha solo due: un Name e se è Closed o meno.

index Shape

A shape groups together one or more paths with a style. Practically, it's the object that you'll actually see on the canvas. The grouping is done with the checkboxes in front of the paths and styles: Just select your shape and tick off the desired path(s) and a style.

A shape defines how a path and style is applied, e.g. if the object is filled or only stroked (which is done by using Transformers on the shape, we'll get to that later). Also, a shape can be moved, rotated or resized without touching the used path. That way, you can re-use a single path and get different, but related, shapes.

i-o-m-shape

When a shape is selected from the list, a rectangle is drawn around it. Depending on where exactly you grab it, the shape is moved, resized or rotated around a point in its center, which itself can be moved. Holding SHIFT will lock direction when moving, limit rotating to 45° angles and restrict the aspect ratio while resizing. The mouse pointer again indicates the current mode:

i-o-m- move-shape i-o-m-pointer-resize i-o-m-pointer-rotate i-o-m-pointer-move-rotation
Move Resize Rotate Move
rotation point

Shapes lie on top of each other, each is on its own layer, if you will. To reorder them you drag & drop their entry to a different position in the list.

Shape Menu

The Shape menu offers the before mentioned possibility to Add empty, with path/style/path & style and to Duplicate or Remove a shape. Then, there is:

Reset TransformationReverts all the move, resize and rotate transformations you have applied to the shape.
Freeze TransformationWhen you transform a shape, its assigned path(s) stay in their original position. This may be intended; maybe more than one shape is using that path, maybe you intentionally used Options | Snap to grid to set the points at precise pixel borders.
If not, "Freeze transformation" will apply the current shape transformation to the assigned path(s). A future "Reset Transformation" will then return to this new state.

Proprietà delle forme

Accanto al Name, la visuale Properties per le forme ha le seguenti opzioni:

Min LODLivello minimo di dettaglio
Max LODLivello massimo di dettaglio
Livello di Dettaglio (LOD)
16x1632x3264x64
i-o-m-lod-icon_16 i-o-m-lod-icon_32 i-o-m-lod-icon_64

See how there are no numbers in the 16px version of the BeVexed icon? That's done with the "Level of Detail" setting of their shapes.
With the LOD you control the visibility of a shape depending on its size. That way, you can leave away details of an icon that look good on a bigger icon, but maybe not so much on its smaller version.

This is how it works: A LOD of 1.0 is defined as a 64px icon size. To get the LOD of a particular icon size you simply divide it by 64, e.g. a 16px icon has a LOD of 16/64 = 0.25. A shape won't be visible below its Min LOD and above its Max LOD.

So, if you set a shape's Min LOD to 0.0 and the Max LOD to 0.5, this means that the shape will only be visible for icon sizes smaller or equal to 32px. If you wanted to exclude the 32px icon size, you'd have to stay below 0.5, say 0.49.

The LOD is not only for leaving out detailing shapes, but also to e.g. change the stroke width at different sizes, if you feel that's needed. Simply duplicate a shape, make your changes and set both of their LOD settings to show either one or the other. Here lies the only source of potential confusion, when you unwittingly overlap LODs of shapes, and wonder why at some size both are visible…
For example, if Shape 1 were to be shown below 48px and Shape 2 from 48px upward (LOD: 48/64 = 0.75):

OKNon OK!
Forma 1Min LOD0.00Min LOD0.00
Max LOD0.74Max LOD0.75
Forma 2Min LOD0.75Min LOD0.75
Max LOD4.00Max LOD4.00

index Stile

Uno stile può essere dato un colore pieno oppure da alcuni tipi di gradiente.
Oltre ai colori predefiniti sotto Swatches, è possibile crearne di propri facendo clic sul colore corrente. Inoltre, si faccia caso al cursore sotto lo spettro di colori, questo serve per impostare il canale alfa (trasparenza).

i-o-m-gradients

È possibile creare rapidamente un nuovo stile semplicemente mescolando il colore e trascinandolo all'interno della lista degli stili.

If you go for a gradient, you set the type (Linear, Radial, Diamond, Cone) and then define the start and end colors. This is done with a drag & drop from a color bucket into the respective color indicator under the gradient.
Of course you can move these indicators to change the gradient to your liking. You can also insert more indicators to add more colors by double-clicking into the gradient. Pressing DEL removes the selected indicator.

You can move, resize and rotate the representing box of a gradient on the canvas until it fits your needs. This works just like with shapes.

Menu Stile

The Style menu offers the usual entries to Add, Duplicate or Remove a style and to Reset transformation.

Proprietà dello Stile

The Name is the only Properties of a style.

index Trasformatori

A shape can have Transformers which change its appearance. The effects, however, are more subtle than a truck turning into a battle robot…

Transformer Add Menu

ContourAdds an outline to a shape.
StrokeStrokes the path of a shape instead of filling it with a style.

Depending on the kind of Transformer, you'll get a different set of properties.

Transformer Properties

Besides a Name and the actual Width for the transformer, the Properties view has these (depending on its type slightly differing) options:

CapsStroke only. Defines the end caps of a line: Butt, Square or Round.
Detect Orient.Contour only. Determines if the contour is to the inside or outside the path.
JoinsDefines how lines are joined at a point: Miter, Round or Bevel.
Miter LimitOnly when the above Joins is set to "Miter" this setting influences the looks of the miter joint.

index Salvare un'icona

Anche qui in alto c'è la solita barra con File, Edit, Options. L'utilizzo è piuttosto intuitivo, pertanto si presterà attenzione soltanto a come salvare un lavoro.

File | Save as… will save in a special Icon-O-Matic format that retains additional information like the names of paths, shapes and styles. These will be stripped from the actual icon once you export it to save space. It's a good idea to back-up your work like this, because without named objects everything's named "<path>/<shape>/<style>" which makes specific changes tedious.

File | Export as… opens a familiar save panel with a file format pop-up menu at the bottom, offering these choices:

HVIFHaiku Vector Icon Format
HVIF RDefSalva come risorsa utilizzata dai programmatori
Codice sorgente HVIFSalva come codice sorgente utilizzato dai programmatori
SVGSalva come SVG
PNGSalva come PNG di 64px di dimensioni
Set di PNGSalva come PNG di 16, 32 e 64px di dimensioni
BEOS:ICON attributeChoose a file and set its icon attribute directly
META:ICON attributeChoose a file and attach the icon as mere meta data

index Consigli e trucchetti

Di seguito alcune cose che bisognerebbe tenere a mente quando si lavora con Icon-O-Matic e alcuni consigli per il suo utilizzo: