Back to index

wims  3.65+svn20090927
Defines | Functions | Variables
flydraw.c File Reference
#include "flydraw.h"
#include "../Lib/libwims.h"
#include "lines.c"
#include "nametab.c"
#include "evalue.c"
#include "vimg.c"
#include "objects.c"

Go to the source code of this file.

Defines

#define JC_NB_MATRICES   19

Functions

void output (void)
void process (void)
int verify_tables (void)
int main (int argc, char *argv[])

Variables

char imagefilename [1024]
char vimgfilename [1024]
int sizex
int sizey
int saved
gdImagePtr image = NULL
gdImagePtr brushimg = NULL
gdImagePtr tileimg = NULL
gdImagePtr wimg = NULL
int brushed = 0
int tiled = 0
int styled = 0
int width = 1
int savew = 1
int wcolor = -1
int color_white
int color_black
int color_bounder
int linecnt = -100000
int tranged = 0
double xscale = 1
double yscale = 1
double xstart = 0
double ystart = 0
double tstart = 0
double tend = 1
double tstep = 100
double plotjump = 200
double animstep = 0
double matrix [] = {1,0,0,1}
int transform = 0
double transx = 0
double transy = 0
int lstep = 4
ev_variable vartab [MAX_VARS]
char varnamebuf [MAX_VARNAMEBUF]
char * varnameptr = varnamebuf
int varcnt
int vimg = 0
int vimg_enable = 0
int vimg_ready = 0
FILE * vimgf = NULL
double scale_buf [MAX_PARMS]
double matrix01 [] = {1,0,0,1}
 les matrices suivantes sont initialisees par la commande setmatrix nummatrix,a11,a12,a21,a22
double matrix02 [] = {1,0,0,1}
double matrix03 [] = {1,0,0,1}
double matrix04 [] = {1,0,0,1}
double matrix05 [] = {1,0,0,1}
double matrix06 [] = {1,0,0,1}
double matrix07 [] = {1,0,0,1}
double matrix08 [] = {1,0,0,1}
double matrix09 [] = {1,0,0,1}
double matrix10 [] = {1,0,0,1}
double matrix11 [] = {1,0,0,1}
double matrix12 [] = {1,0,0,1}
double matrix13 [] = {1,0,0,1}
double matrix14 [] = {1,0,0,1}
double matrix15 [] = {1,0,0,1}
double matrix16 [] = {1,0,0,1}
double matrix17 [] = {1,0,0,1}
double matrix18 [] = {1,0,0,1}
double matrix19 [] = {1,0,0,1}
double * matrices_pavage []
double vector [] = {0,0}
 les vecteurs suivants sont initialises par la commande setvector numvector,u_1,u_2
double vector01 [] = {0,0}
double vector02 [] = {0,0}
double vector03 [] = {0,0}
double vector04 [] = {0,0}
double vector05 [] = {0,0}
double vector06 [] = {0,0}
double vector07 [] = {0,0}
double vector08 [] = {0,0}
double vector09 [] = {0,0}
double vector10 [] = {0,0}
double vector11 [] = {0,0}
double vector12 [] = {0,0}
double vector13 [] = {0,0}
double vector14 [] = {0,0}
double vector15 [] = {0,0}
double vector16 [] = {0,0}
double vector17 [] = {0,0}
double vector18 [] = {0,0}
double vector19 [] = {0,0}
double * vecteurs_pavage []
double parallogram_fonda [] = {0,0,100,0,0,100}
 les coordonnees du parallelograme de pavage = coordonnees "mathematiques" du parallelogramme contenant l'image a recopier

Define Documentation

Definition at line 71 of file flydraw.c.


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 152 of file flydraw.c.

{
    error1=error; error2=error; error3=error;
    substitute=substit;
    ev_varcnt=&varcnt; ev_var=vartab;
    if(argc==2 && strcasecmp(argv[1],"table")==0) {
       if(verify_tables()) {
           printf("Table disorder.\n"); return 1;
       }
       printf("Table orders OK.\n"); return 0;
    }
    vartab[0].name="animstep"; vartab[0].value=0;
    varcnt=1;
    if(argc>1) snprintf(imagefilename,sizeof(imagefilename),"%s",argv[1]);
    else imagefilename[0]=0;
    process();
    if(!saved || imagefilename[0]!=0) output();
    if(image) gdImageDestroy(image);
    if(vimg_ready) vimg_close();
    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void output ( void  )

Definition at line 119 of file flydraw.c.

{
    FILE *out;

    if(!image) return;
    if(imagefilename[0]) {
       out=fopen(imagefilename,"wb");
       if(out!=NULL) {gdImageGif(image,out); fclose(out); }
    }
    else gdImageGif(image,stdout);
    saved=1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void process ( void  )

Definition at line 138 of file flydraw.c.

{
    char buf[MAX_LINELEN+1];
    int c;
    do {
       c=ggetline(buf); obj_main(buf);
    }
    while(c!=EOF);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int verify_tables ( void  )

Definition at line 148 of file flydraw.c.

                        {
    return evaltab_verify();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

double animstep = 0

Definition at line 35 of file flydraw.c.

int brushed = 0

Definition at line 29 of file flydraw.c.

Definition at line 28 of file flydraw.c.

Definition at line 30 of file flydraw.c.

Definition at line 30 of file flydraw.c.

Definition at line 30 of file flydraw.c.

Definition at line 28 of file flydraw.c.

char imagefilename[1024]

Definition at line 25 of file flydraw.c.

int linecnt = -100000

Definition at line 31 of file flydraw.c.

int lstep = 4

Definition at line 39 of file flydraw.c.

double* matrices_pavage[]
double matrix[] = {1,0,0,1}

Definition at line 36 of file flydraw.c.

double matrix01[] = {1,0,0,1}

les matrices suivantes sont initialisees par la commande setmatrix nummatrix,a11,a12,a21,a22

elles sont remises a l'unite par resetmatrix nummatrix

Definition at line 52 of file flydraw.c.

double matrix02[] = {1,0,0,1}

Definition at line 53 of file flydraw.c.

double matrix03[] = {1,0,0,1}

Definition at line 54 of file flydraw.c.

double matrix04[] = {1,0,0,1}

Definition at line 55 of file flydraw.c.

double matrix05[] = {1,0,0,1}

Definition at line 56 of file flydraw.c.

double matrix06[] = {1,0,0,1}

Definition at line 57 of file flydraw.c.

double matrix07[] = {1,0,0,1}

Definition at line 58 of file flydraw.c.

double matrix08[] = {1,0,0,1}

Definition at line 59 of file flydraw.c.

double matrix09[] = {1,0,0,1}

Definition at line 60 of file flydraw.c.

double matrix10[] = {1,0,0,1}

Definition at line 61 of file flydraw.c.

double matrix11[] = {1,0,0,1}

Definition at line 62 of file flydraw.c.

double matrix12[] = {1,0,0,1}

Definition at line 63 of file flydraw.c.

double matrix13[] = {1,0,0,1}

Definition at line 64 of file flydraw.c.

double matrix14[] = {1,0,0,1}

Definition at line 65 of file flydraw.c.

double matrix15[] = {1,0,0,1}

Definition at line 66 of file flydraw.c.

double matrix16[] = {1,0,0,1}

Definition at line 67 of file flydraw.c.

double matrix17[] = {1,0,0,1}

Definition at line 68 of file flydraw.c.

double matrix18[] = {1,0,0,1}

Definition at line 69 of file flydraw.c.

double matrix19[] = {1,0,0,1}

Definition at line 70 of file flydraw.c.

double parallogram_fonda[] = {0,0,100,0,0,100}

les coordonnees du parallelograme de pavage = coordonnees "mathematiques" du parallelogramme contenant l'image a recopier

on place ces coorodonnes avec setparallelogram xs,ys,xu,yu,xv,yu TODO serait-ce un moyen de definir la brush ??

Definition at line 114 of file flydraw.c.

double plotjump = 200

Definition at line 34 of file flydraw.c.

int saved

Definition at line 27 of file flydraw.c.

int savew = 1

Definition at line 29 of file flydraw.c.

Definition at line 48 of file flydraw.c.

int sizex

Definition at line 27 of file flydraw.c.

int sizey

Definition at line 27 of file flydraw.c.

int styled = 0

Definition at line 29 of file flydraw.c.

double tend = 1

Definition at line 34 of file flydraw.c.

int tiled = 0

Definition at line 29 of file flydraw.c.

Definition at line 28 of file flydraw.c.

int tranged = 0

Definition at line 32 of file flydraw.c.

int transform = 0

Definition at line 37 of file flydraw.c.

double transx = 0

Definition at line 38 of file flydraw.c.

double transy = 0

Definition at line 38 of file flydraw.c.

double tstart = 0

Definition at line 34 of file flydraw.c.

double tstep = 100

Definition at line 34 of file flydraw.c.

int varcnt

Definition at line 42 of file flydraw.c.

Definition at line 41 of file flydraw.c.

Definition at line 41 of file flydraw.c.

Definition at line 40 of file flydraw.c.

double* vecteurs_pavage[]
double vector[] = {0,0}

les vecteurs suivants sont initialises par la commande setvector numvector,u_1,u_2

ils sont remis a zero par resetvector numvector

Definition at line 80 of file flydraw.c.

double vector01[] = {0,0}

Definition at line 81 of file flydraw.c.

double vector02[] = {0,0}

Definition at line 82 of file flydraw.c.

double vector03[] = {0,0}

Definition at line 83 of file flydraw.c.

double vector04[] = {0,0}

Definition at line 84 of file flydraw.c.

double vector05[] = {0,0}

Definition at line 85 of file flydraw.c.

double vector06[] = {0,0}

Definition at line 86 of file flydraw.c.

double vector07[] = {0,0}

Definition at line 87 of file flydraw.c.

double vector08[] = {0,0}

Definition at line 88 of file flydraw.c.

double vector09[] = {0,0}

Definition at line 89 of file flydraw.c.

double vector10[] = {0,0}

Definition at line 90 of file flydraw.c.

double vector11[] = {0,0}

Definition at line 91 of file flydraw.c.

double vector12[] = {0,0}

Definition at line 92 of file flydraw.c.

double vector13[] = {0,0}

Definition at line 93 of file flydraw.c.

double vector14[] = {0,0}

Definition at line 94 of file flydraw.c.

double vector15[] = {0,0}

Definition at line 95 of file flydraw.c.

double vector16[] = {0,0}

Definition at line 96 of file flydraw.c.

double vector17[] = {0,0}

Definition at line 97 of file flydraw.c.

double vector18[] = {0,0}

Definition at line 98 of file flydraw.c.

double vector19[] = {0,0}

Definition at line 99 of file flydraw.c.

int vimg = 0

Definition at line 43 of file flydraw.c.

int vimg_enable = 0

Definition at line 45 of file flydraw.c.

int vimg_ready = 0

Definition at line 46 of file flydraw.c.

FILE* vimgf = NULL

Definition at line 47 of file flydraw.c.

char vimgfilename[1024]

Definition at line 26 of file flydraw.c.

int wcolor = -1

Definition at line 29 of file flydraw.c.

int width = 1

Definition at line 29 of file flydraw.c.

Definition at line 28 of file flydraw.c.

double xscale = 1

Definition at line 33 of file flydraw.c.

double xstart = 0

Definition at line 33 of file flydraw.c.

double yscale = 1

Definition at line 33 of file flydraw.c.

double ystart = 0

Definition at line 33 of file flydraw.c.