[openbeos] Re: Haiku Icon set ...

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Mon, 09 Apr 2007 03:13:30 +0200

Hi Begasus,

as you can see, my catching up on past subjects in the mailing lists is quite 
slow... sorry about that.


On 2007-02-27 at 21:56:05 [+0100], Begasus <Begasus@xxxxxxxxx> wrote:
> I don't have a prob with converting icons over in another format, even if
> that is in HVIF, to bad that there isn't a plugin for this in the latest
> Wonderbrush 2.1. I'm not a great artist in IconOMatic yet (as I love
> WonderBrush to much) but a plugin or translator for HVIF could be helpfull 
> in this case to create Haiku ready icons.
> I'm still not sure how the icons are set in Haiku (but then again it took me
> quite some time to figure that out in ZETA also), so some guidelines on how
> to change icons/decor in Haiku would be something to consider in the future.
> I'm planning to write some info in the near future to show people how this
> can be done in ZETA.

As people have already pointed out, you need to use Icon-O-Matic to do the 
conversion. When you simply drop an SVG onto the Icon-O-Matic window, it will 
import your graphics. Here is a step by step procedure of how to set an SVG 
file as icon in Haiku which should work (from a Haiku user perspective 
(assuming you run Haiku)):

1 - right-click the file you want to change the icon of
2 - invoke the FileType Tracker add-on
3 - right-click the icon or empty icon area, chose "Edit"
4 - Icon-O-Matic comes up, either empty or with an icon if the file had one
5 - if the icon is not empty, you need to delete all objects (I will add a 
quick command for this soon, don't use "File->New")
6 - with the Shift key pressed, drag your SVG icon, which you have done in 
for example WonderBrush, into Icon-O-Matic
7 - use File->Save, you should see the updated icon in the still open 
FileType window
8 - in FileType, invoke File->Save to save the new icon to the actual file


You might think that these instructions contain a few weird extra steps, like 
having to clean out the icon first and also having to press shift. Please 
bear with me, it will get easier, but for the time being, just follow my 
explaination, it is not that complicated, I'm just trying to explain in 
detail.
The reason for these extra steps is that when you drag a file into 
Icon-O-Matic, you set the editor to edit this *file*, so it is pointing to 
the original file of the graphics being edited. Now, when Icon-O-Matic was 
invoked from FileTypes, a special mode makes it point to the running 
FileTypes instance, so that when you "Save", the data goes to the FileTypes 
add-on instead of into any file on disk. If you want to import an SVG file, 
you need to make sure that you *append* it to the icon already being edited, 
instead of *replacing* the icon - which would cause Icon-O-Matic to loose the 
link with FileType. But if you *append* (the shift-drag), you need to make 
sure the icon is actually empty first.


I hope this explains it. Please keep in mind that Icon-O-Matic is currently 
used to design new vector icons for Haiku, therefor the features are tailored 
to what we need to put these icons into the Haiku source tree (RDef export). 
Additionally, it does let you attach an SVG as an HVIF icon to a file. For 
this, use the File->Export feature and chose the Format "BEOS:Icon 
Attribute". If you are working with mimetypes, you can also chose the 
"META:Icon Attribute" and save directly to an existing mimetype file (in your 
mime type database, if you know what you are doing). Chosing these two format 
options will *not* overwrite the file data (despite the file panel warning 
you otherwise), they will only create or overwrite the icon attribute data in 
Haiku format. So I can give you an easier list, but I wanted to explain the 
above procedure anyways. Here is a smaller list:

1 - launch Icon-O-Matic
2 - drag your SVG file into the window
3 - go to File->Export
4 - pick the export format "BEOS:ICON Attribute"
5 - chose the file to which you want to attach the icon in the file panel
6 - ignore the warning that it would overwrite the file, it only overwrites 
the icon if there was one before


This icon will only be visible from the Haiku version of Tracker of course.


> I hope Stephan could get some fix for this also, even if it is for some 
> small update on the latest version for Wonderbrush so it could save icons
> to HVIF also (maybe a small sp?), on the other hand ... an import plugin
> for HVIF files for WonderBrush would be nice too ... ;).

Because WonderBrush does multi-pass rendering, you get the problem of visible 
seams between adjacent shapes. This is the reason why I find WonderBrush less 
suitable. It also cannot resuse styles and paths. Or attach transformers.

Best regards,
-Stephan


Other related posts: