/******************************************************************* * Header file of Graph2D.cpp Version 1.0, 10/03/1996 * * for Visual C++ 1.5 J-P Moreau * ******************************************************************** * Functions to draw a 2D curve y=f(x) with automatic scaling in * * linear or logarithmic scales, in a window defined by Fenetre(). * * * * Main global variables: * * * * xgclot,xdclot,ybcot,yhclot : limits in pixels of the window * * defined by Fenetre(). * * MaxX, MaxY : screen resolution in X and Y * * ( Ex : MaxX=639 MaxY=349 ). * * Log_X, Log_Y : log. scale if = 1 * * Ech_auto : automatic scaling if = 1 * * If Ech_auto = 0, scales in X and Y are defined by: * * X_mini, X_maxi, Y_mini et Y_maxi. * * * *******************************************************************/ #include #include #include #include #include #include // Number of pixels by screen cm in ox and oy (screen and printer) #define XrIBM 29.0 // VGA screen #define YrIBM 27.0 #define XrEPSON 140.0 // 360 dpi printer #define YrEPSON 140.0 #define XrHP 118.1 // 300 dpi printer #define YrHP 118.1 int id_imprim,id_couleur,id_HP,id_EPSON; const XMini=0, YMini=0, Bord=5; // Global variables double xmin,xmax,ymin,ymax,Cxmx,Cymx,xratio,yratio; double dx,dy,Echx,Echy,xo,yo,Xc,Yc; double X_mini,X_maxi,Y_mini,Y_maxi; int wind,xgclot,xdclot,ybclot,yhclot; int ixmn,ixmx,iymn,iymx,xmin1,xmax1,ymin1,ymax1; int Ech_auto=1,id_out,Log_X,Log_Y,MaxX,MaxY; int ix,iy; // ix,iy = current point in pixels // xo,yo = coordinates of point (xmin,ymin) // Xc,Yc = coordinates of screen lower left corner extern HDC hdc; // end of file graph2d.h