home *** CD-ROM | disk | FTP | other *** search
- Uses Crt, Graph;
-
- {-------------------------------------------------------------------------}
- Procedure StartGraphics;
- Var
- GraphDetect,GraphMode,ErrorCode : Integer;
- Begin;
- GraphDetect := Detect; {Detect is a constant with the value 0,
- this means that InitGraph will autodetect the hardware}
- InitGraph(GraphDetect, GraphMode, ''); {GraphMode is ignored, since
- InitGraph is autodetecting}
- ErrorCode := GraphResult;
- if GraphResult <> grOk then
- Begin;
- ClrScr;
- Writeln(GraphErrorMsg(ErrorCode));
- Writeln('An error has occured whilst attempting to use the graphics.');
- Writeln('The program has been halted.');
- Halt;
- End;
- End;{Of Procedure StartGraphics}
- {----------------------------------------------------------------------}
- Function XX(Percent : Real) :Integer;
- Begin;
- XX:= Round((GetMaxX /100) * Percent);
- End;{Of Function XX}
- {----------------------------------------------------------------------}
- Function YY(Percent : Real) :Integer;
- Begin;
- YY:= Round((GetMaxY /100) * Percent);
- End;{Of Function YY}
- {----------------------------------------------------------}
- Procedure Picture ;
- Begin;
- StartGraphics;
- SetColor(Yellow);
- SetFillStyle(SolidFill,Yellow);
- Rectangle(XX( 27.54),YY( 49.28),XX( 33.02),YY( 77.65));
- Rectangle(XX( 33.02),YY( 49.00),XX( 33.80),YY( 74.50));
- Rectangle(XX( 27.39),YY( 49.28),XX( 26.76),YY( 74.50));
- Circle(XX( 30.05),YY( 43.84),XX( 3.76));
- Rectangle(XX( 26.45),YY( 77.65),XX( 29.73),YY( 79.08));
- Rectangle(XX( 30.99),YY( 77.65),XX( 34.59),YY( 79.08));
- Line(XX( 28.79),YY( 45.27),XX( 30.05),YY( 44.70));
- Line(XX( 30.05),YY( 44.70),XX( 31.30),YY( 45.27));
- Line(XX( 31.30),YY( 45.27),XX( 29.89),YY( 45.85));
- Line(XX( 29.89),YY( 45.85),XX( 29.42),YY( 45.56));
- Circle(XX( 28.33),YY( 41.83),XX( 0.16));
- Circle(XX( 31.61),YY( 41.55),XX( 0.00));
- Line(XX( 11.58),YY( 79.37),XX( 84.04),YY( 79.37));
- Rectangle(XX( 43.19),YY( 49.57),XX( 50.55),YY( 77.36));
- Rectangle(XX( 46.17),YY( 77.36),XX( 52.90),YY( 79.08));
- Rectangle(XX( 45.70),YY( 49.57),XX( 48.20),YY( 74.50));
- Circle(XX( 46.64),YY( 44.13),XX( 3.91));
- Line(XX( 50.55),YY( 44.13),XX( 55.56),YY( 44.99));
- Line(XX( 55.56),YY( 44.99),XX( 50.39),YY( 46.13));
- Circle(XX( 48.51),YY( 41.55),XX( 0.16));
- OutText('Please press any key to continue.');
- Repeat Until KeyPressed;
- CloseGraph;
- End;
- {----------------------------------------------------------}
- Begin;
- Picture;
- End.