{ graphtxt.dem 2-16-1990 Compile and run under TP 5.5. John W. Small PSW / Power SoftWare P.O. Box 10072 McLean, Virginia 22102 8072 (703) 759-3838 } program graphtxtDemo; uses graph, graphtxt; var driver, mode, error, dx, dy, c : integer; istr : string; begin driver := detect; InitGraph(driver,mode,''); error := GraphResult; if error <> grOk then begin writeln('Graphics error: ',GraphErrorMsg(error)); halt end; InitGraphText; dx := GetMaxX div (GetMaxColor+1); ClearViewPort; for c := 0 to GetMaxColor do begin SetFillStyle(XHatchFill,c); bar3d(c*dx,0,(c+1)*dx,GetMaxY,0,false); end; SetTextJustify(LeftText,TopText); SetTextStyle(TriplexFont,HorizDir,4); writeln('Include graphtxt in your "uses" clause.'); writeln('Call "InitGraphText" after "InitGraph()"'); writeln('to have complete writeln and readln'); writeln('capabilities in all graphics modes.'); writeln; writeln('Let''s try readln.'); write('Enter : '); readln(istr); SetBkColor(BLUE); SetColor(WHITE); ClearViewPort; SetTextStyle(SansSerifFont,VertDir,4); SetTextJustify(LeftText,BottomText); MoveTo(0,GetMaxY); writeln('It even works with'); writeln('vertical text.'); writeln; write('Let''s try readln : '); readln(istr); ClearViewPort; SetTextStyle(GothicFont,HorizDir,4); SetTextJustify(LeftText,TopText); writeln('Besure to call "CloseGraphText"'); writeln('before calling "CloseGraph."'); SetTextJustify(CenterText,TopText); MoveTo(GetMaxX div 2,GetMaxY div 2); writeln('Goodbye time'); writeln('consuming graphic'); writeln('text programming!'); writeln; writeln('Press enter to continue.'); readln; CloseGraphText; CloseGraph; writeln('If you find graphtxt useful and are using it in your'); writeln('applications, a registration fee of $7 is requested.'); writeln('Upon registration you will be sent source code and the'); writeln('latest examples programs on a DOS formatted 5 1/4" disk.'); writeln; writeln('PSW / Power SoftWare'); writeln('P.O. Box 10072'); writeln('McLean, Virginia 22102 8072'); writeln('(703) 759-3838'); writeln; writeln('That''s all folks!'); writeln; writeln('Press enter to quit.'); readln; end.