home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega CD-ROM 1
/
megacd_rom_1.zip
/
megacd_rom_1
/
MAGAZINE
/
INSIDE_T
/
ITPAUG90.ZIP
/
TEST2.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1990-06-20
|
938b
|
42 lines
{*************************************************
* 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;