Hi,
below is a small modification of the Dislin example map_c.c, that includes an image file in a
draw widget instead of plotting a map. The image is scaled to the Dislin plot page. Note that
you can include PNG, GIF, BMP and TIFF files with the routine INCFIL. The example is written
in C, but it should be easy to convert it to Fortran, or any other language.
Best regards,
Helmut
---------
#include <stdio.h>
#include "dislin.h"
static int id_draw;
void myplot (int id);
int main()
{ int ip, ip1, ip2, id_but, id_quit, id_lab;
ip = wgini ("hori");
swgwth (-15);
ip1 = wgbas (ip, "vert");
swgwth (-50);
ip2 = wgbas (ip, "vert");
swgdrw ((float) (2100./2970.));
id_but = wgpbut (ip1, "Plot");
swgcbk (id_but, myplot);
id_quit = wgquit (ip1);
id_lab = wglab (ip2, "DISLIN Draw Widget:");
id_draw = wgdraw (ip2);
wgfin ();
return 0;
}
void myplot (int id)
{
setxid (id_draw, "widget");
metafl ("cons");
disini ();
filopt ("on", "scale");
incfil ("dislin.png"); /* here you can use your own image file */
disfin ();
}
-----