MODULE TestDIG; IMPORT Terminal; FROM DIG IMPORT (* TYPE *) GArrowHead, GLineType, GFontType, GJustType, GDeviceType, (* VAR *) GDevice , (* PROC *) GInitDevice, GErase, GWindow, GMapWindow, GMove, GDraw, GBox, GCircle, GEllipse, GArc, GLine, GArrow, GSpline, GSetLinePattern, GSetFont, GSetCharSize, GCharCellSize, GText; VAR xmin, xmax, ymin, ymax, x, y, rad, cht, cwid, slant, rot : REAL; cellht, cellwid : REAL; char : CHAR; BEGIN GDevice := vt125; GInitDevice( 0.0, 0.0, 767.0, 479.0, 5, 6 ); GErase( ); GMapWindow( 0.0, 0.0, 5.8, 3.24 ); (* inches *) cht := 0.15; cwid := 0.15; slant := 0.0; GSetCharSize( cht, cwid, slant ); (* box *) GBox( 0.0, 0.0, 5.8, 3.24 ); GBox( 0.1, 2.0, 2.5, 3.0 ); GText( 0.1, 2.0, "Box at .1,2.", cht, cwid, 0.0, LeftJustify ); GText( 2.6/2.0, 5.0/2.0, "Centered", cht, cwid, 0.0, CenterJustify ); GText( 2.5, 2.8, "RightJust", cht, cwid, 0.0, RightJustify ); (* Circle *) GSetLinePattern( GDotted ); GCircle( 3.5, 1.5, 1.0 ); GText( 3.5, 1.5, "Circle Center", cht, cwid, 0.0, CenterJustify ); GCharCellSize( cht, cwid, cellht, cellwid ); GText( 3.5, 1.5-cellht, "One Cell Below", cht, cwid, 0.0, CenterJustify ); y := 1.5 - cht; cwid := 2.0*cwid; cht := 2.0*cht; slant := 27.0; GSetCharSize( cht, cwid, slant ); GCharCellSize( cht, cwid, cellht, cellwid ); GText( 3.5, y-cellht, "2*cellht One Cell Below", cht, cwid, 0.0, CenterJustify ); (* arrow *) GSetLinePattern( GDashed ); GArrow( 2.5, 2.0, 3.5, 1.5, BothHead ); Terminal.Read( char ) END TestDIG.