On 5 Feb 2000, Marcus Sundberg wrote:

> [EMAIL PROTECTED] (Christoph Egger) writes:
> 
> > > If you want to load images into a LibGGI visual, write a library
> > > that loads them into a memory visual.
> > 
> > What do _you_ think what is the idea behind of the file-target?
> 
> The purpose of the file-target is to transparently render a LibGGI
> application's output to a file.

And the application's output can be _anything_. And "anything" means, that
this could be also a screenshot for example, which is usually saved as
*.pcx, *.ppm or something like that.

> Making it _read_ files does not gain you anything over any other
> approach, and is plain wrong.

No. You can easily write a ggiviewer for example (have a look at the
attachment).

> Especially considering that you can't do anything with a visual
> until you have set a mode, and ggiSetMode() clears the visual...

I can't follow you here. Please explain it more detailed.

Christoph Egger
E-Mail: [EMAIL PROTECTED]
#include <ggi/ggi.h>

#define TEST_FILE       author_19.bmp

int main(int argc, char *argv[])
{
        ggi_visual_t vis, file_vis;
        ggi_mode *tm;

        if (ggiInit() < 0)
                return 1;

        vis = ggiOpen(NULL);
        file_vis = ggiOpen("display-file:./author19.bmp");

        ggiCheckMode(file_vis, tm);
        ggiSetMode(vis, tm);

        ggiCrossBlit(file_vis, 0,0, tm->virt.x,tm->virt.y, vis,0,0);

        do {} while ( !ggiGetc(vis));

        ggiClose(file_vis);
        ggiClose(vis);

        ggiExit();
}

Reply via email to