On  6 Feb, Lars R. Clausen wrote:
> Hmmm... it might be you have an old imlib?  I use 1.9.1, so I don't know if
> any of the features I use are new.
 Nah, mine is straight from cvs this morning.

> Indeed, it's just a first try.  But I think it's close to what we want.
> BTW, there is a bug in postscript output:  The pictures are upside-down.
> I will look at a fix.
 Probably some easy sign bug.
 
>> 1. While imlib is very easy to use for the programmer it is not as easy
>> to use for the user. It creates very large dependencies to stuff that
>> not everyone has. And not everyone have imlib either. On the other hand,
>> having to do your own loading of images is a royal pain in the ass, so
>> we might have to run with it.
> 
> It actually only depends on gtk, which we have already.  Making our own
> library would just be duplicate effort and introducing bugs.
 Well, to be usable it depends on libpng, libtiff, libjpeg, zlib,
 ImageMagick, libungif. These are libraries that exists in most linux
 distributions, but they rarely exists in commercial unixes like
 Solaris or AIX. They can of course be downloaded and compiled, but
 that takes a lot of time and space, and you might only have some 5 or
 10 Meg quota on you home-dir and no root-access.

> That's what I thought, too.  Maybe it could be a saving option?  In most
> cases, you'd only want to save the filenames, but when distributing, you
> would want it all in there.
 Yeah, maybe. Then we need to be able to convert images to/from ascii
 strings.

 Another thing. I want a thin wrapper around imlib. It should be
 basically possible to swap imlib for something else, and just have to
 recompile all the objects. Something like i have done with gnome-xml,
 check out lib/dia_xml.h. No object ever includes anything from
 gnome-xml or calls any gnome-xml function directly. The interface is
 very slim though. 

Instead of:
typedef void (*DrawImageFunc) (Renderer *renderer,
                               Point *point,
                               real width, real height,
                               GdkImlibImage *image);

I want:
typedef void (*DrawImageFunc) (Renderer *renderer,
                               Point *point,
                               real width, real height,
                               DiaImage image);


All the objects #include "dia_image.h", which typedefs DiaImage as 
void *, except when included from dia_image.c. Then it is typedefed to
GdkImlibImage *. Then we need function calls in dia_image like this:
(or something near)
image_get_rgbdata(DiaImage image)
image_get_width(DiaImage)
image_get_height(DiaImage)

Maybe something to copy an image to a pixmap, or maybe just use the
GdkImlibImage typedef in render_gdk.c.

/ Alex



Reply via email to