//////////////////This program is written by Lutz Tautenhahn, Chemnitz 1995. ////////////////////////////////You may use this code for your own purposes. ////////////////////////////////There are no conditions and no restrictions. #define StringLength 20 enum boolean {false, true}; class LTDiagram { public: LTDiagram(double theLeftX = 0.0, double theRightX = 1.0, double theBottomY = 0.0, double theTopY = 1.0, int theLeft = 80, int theTop = 40, int theRight = 600, int theBotttom = 440, void* theScaleX = "X", void* theScaleY = "Y", void* theTitle = ""); void SetFrame (int theLeft, int theTop, int theRight, int theBottom); void SetBorder(double theLeftX, double theRightX, double theBottomY, double theTopY); void SetText(void* theScaleX, void* theScaleY, void* theTitle); int ScreenX(double theRealX); int ScreenY(double theRealY); double RealX(int theScreenX); double RealY(int theScreenY); void Draw(int DrawColor = 8, int TextColor = 15, int ZeroColor = 4, boolean isGrid = true, boolean isScaleText = true); private: int sign(double rr); int round(double rr); int MinLength(double theValue); double xmin, xmax, ymin, ymax; int right, left, bottom, top; char xtext[StringLength], ytext[StringLength]; char title[60]; };