home *** CD-ROM | disk | FTP | other *** search
- {*************************************************
- * TEST2.PAS - Draw stars on coordinate system of *
- * x ε (0,1.0) and y ε (0,1.0) *
- *************************************************}
-
- PROCEDURE DrawPict;
-
- VAR
- CtrX, CtrY, MaxX, MaxY, Tx, Ty : Integer;
- L : Real;
- Ctr : Integer;
-
- BEGIN
-
- {* Initialize scaling factors *}
-
- MaxX := GetMaxX;
- MaxY := GetMaxY;
-
- {* Compute screen center coordinate *}
-
- CtrX := MaxX DIV 2;
- CtrY := MaxY DIV 2;
-
- {* Draw the expanding & contracting star *}
-
- FOR Ctr := 1 TO 19 DO BEGIN
- Tx := (MaxX * Ctr) DIV 100;
- Ty := (MaxY * Ctr) DIV 100;
- DrawStar(CtrX,CtrY,Tx,Ty,1);
- Delay(15);
- DrawStar(CtrX,CtrY,Tx,Ty,0);
- END;
- FOR Ctr := 20 DOWNTO 1 DO BEGIN
- Tx := (MaxX * Ctr) DIV 100;
- Ty := (MaxY * Ctr) DIV 100;
- DrawStar(CtrX,CtrY,Tx,Ty,1);
- Delay(15);
- DrawStar(CtrX,CtrY,Tx,Ty,0);
- END
- END;