Re: XForms: flimage question

From: Angus Leeming (a.leeming@ic.ac.uk)
Date: Wed Feb 27 2002 - 11:39:37 EST


# To subscribers of the xforms list from Angus Leeming <a.leeming@ic.ac.uk> :

On Wednesday 27 February 2002 3:35 pm, spl@ncmir.ucsd.edu wrote:
> # To subscribers of the xforms list from spl@ncmir.ucsd.edu :
>
> > Steve, I have just rebuilt lyx with your new library. It dies when
> > linking with:
> >
> > ld:
> > Unresolved:
> > _F64_stat
>
> *Sigh.*

Indeed.

> > Is this problem surmountable or should I back out and wait for Open
> > Source?
>
> Dunno.
>
> I'm beginning to dispair of ever going Open Source. :-( I haven't
> heard from TC in quite a while.

Well, leaving aside the joy that would result from such a move and sticking
only to practicalities, I'm trying to write an image loader for LyX that
leverages the power of the xforms flimage stuff.

My current hold up is a lack of flimage_dup, so I was thinking of rolling my
own. The advantage of this, anyway, is that 0.88 users will benefit too.

I understand that flimage_alloc will initialise an FLIMAGE * correctly, so
now I need to know which members of the FLIMAGE struct are non-zero after an
flimage_load() operation. If it's only a few and they are unchanged across
the different versions of the xforms library, then I'm laughing. An
flimage_dup() routine sufficient for my purposes would then be:

FLIMAGE * flimage_dup(FLIMAGE const * in)
{
        if (!in)
                return 0;

        FLIMAGE * out = flimage_alloc();

        // copy across just those member variables that are non-zero
        // after an flimage_load() operation

        return out;
}

Is this feasible? If so, can you provide me with some pointers? I guess I
could print out the FLIMAGE after flimage_load() to see what is non-zero.

Thereafter, I need only the pixmap to give to the painter. Is the pixmap
generated in this call:

     flimage_display(image, FL_ObjWin(fdui->canvas));

and if so, can I generate the pixmap without actually painting it?

This is a little like a detective story isn't it!

Is my plan of attack achievable, or should I just stick with what I have
already (a very simple image loader that uses libxpm) and let the qt2 guys
create a sophisticated one?

Regards,
Angus
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/



This archive was generated by hypermail 2b29 : Wed May 01 2002 - 13:54:15 EDT