Re: [gtk-list] How to create .xpm?




Yurong Sun wrote:

> Hi,
>
> As a new learner, I am eager to create and put some icons on the toolbar.
> But from the gtk tutorial and examples, I found that the info is very
> limited about creating .xpm or xpm data. I even don't understand the
> format of array created as xpm data.
>
> Could you please give me some info or some places where I can get some
> more detail about creating pixmaps? Thank you very much!

Besides the gtk tutorial, the only other source for gtk info i know of is
"Developing
Linux Applications with GTK+ GDK" by Eric Harlow.

For creating xpms, just use GIMP and save in the proper format.

As for the format of the array, according to this the format goes as follows

x y c n // x by y bitmap, c colors, each color represented by n characters.
/*followed by c lines of the followin
a c #rrrrggggbbbb // defines char (or chars) a as the color #rrrrggggbbbb in
                            //hexdeical form
/*usually one of these linesseems to be
"  c #000000000000" defining ' ' as black
*/
/* this is then followed by y lines of x*n */

Is there anything else specifically you wanted to know?

So does this count for my good deed of the day? Will someone answer the
question i asked yesterday now please? =)






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]