.


:




:

































 

 

 

 


 

³ : . . , .

, , , . Borland Pascal 7.0 , bgi ( Borland Graphics Interface)

, Borland Pascal 7.0 Graph, ³ 볭 , 80 , . Graph ୺ uses:

 

uses Graph;

 

Graph \units\graph.tpu, , . Graph Unit Directories , Options → Directories.

, , :

 

InitGraph (GraphDriver: integer; var GraphMode: integer; PathToDriver: string);

 

:

GraphDriver ;

GraphMode ;

PathToDriver , *.bgi .

 

 

³

 

. . VGA (0,0), (639,479), GetMaxX GetMaxY (X) (Y) . GetX GetY.

, . -, , . -, . -, . , - .

(dX, dY) (, ) , :

m X = w X div w dX; X = (dX * m X) + ∆X;

m Y = h Y div h dY; Y = (dY * m Y) + ∆Y;

m X, m Y ; w X, h Y ; w dX, h dY ; ∆X, ∆Y .

:

 

SetViewPort (x1,y1,x2,y2: integer; Clip: boolean)

 

1, 1, 2, 2 . Clip clipon, clipoff.

ClearViewPort, ClearDevice.

 

 

 

' 0, 1, , maxcolors. VGA 218 , 16. maxcolors 15 16 :

 

Const

Black = 0; {}

Blue = 1; {-}

Green = 2; {-}

Cyan = 3; {-}

Red = 4; {}

Magenta = 5; {-}

Brown = 6; {}

Lightgray = 7; {}

Darkgray = 8; {-}

LightBlue = 9; {}

Lightgreen = 10; {}

Lightcyan = 11; {}

Lightred = 12; {}

Lightmagenta = 13; {}

Yellow = 14; {}

White = 15; {}

. , , . 5. '. .

(. . 5). , , :

 

Const

{ }

EmptyFill = 0; SolidFill = 1; LineFill = 2; LtSlashFill = 3; SlashFill = 4; BkSlashFill = 5; LtBkSlashFill = 6;

HatchFill = 7; XHatchFill = 8; InterleaveFill = 9; WideDotFill = 10; CloseDotFill = 11; UserFill = 12;

 

{ }

SolidLn = 0; DottedLn = 1; CenterLn = 2;

DashedLn = 3; UserBitLn = 4;

 

{ }

NormWidth = 1; ThickWidth = 3;

 



<== | ==>
| 1-2
:


: 2017-02-11; !; : 276 |


:

:

, , .
==> ...

1803 - | 1698 -


© 2015-2024 lektsii.org - -

: 0.012 .