/******************************************************************* * DEMO OF MODULE GRAPH2D.CPP * * ---------------------------------------------------------------- * * This program demonstrates the use of the unit graph2d to draw a * * 2D curve with automatic scaling with use of function CourbeXY() * * * * Visual C++ version by J-P Moreau, Paris * * (use with grafdem1.mak and graph2d.cpp) * * (www.jpmoreau.fr) * *******************************************************************/ #include #include #include #include #define SIZE 256 HDC hdc; RECT rect; HPEN hpen, hpenOld; //Functions used here of Graph2D.cpp void CourbeXY(int,int,float *,double,double); void Legendes (int,char *,char *,char *,int,int,char *,int,int,char *); //"home made" graphic commands for hdc environment used by above functions void DrawPixel(int ix,int iy) { //sorry, no other available command found Rectangle(hdc,rect.left+ix,rect.top+iy, rect.left+ix+2,rect.top+iy+1); } void Swap(int *i1,int *i2) { int it; it=*i1; *i1=*i2; *i2=it; } void DrawLine(int ix1,int iy1,int ix2,int iy2) { int i,il,ix,iy; double dx,dy; if (ix2