.


:




:

































 

 

 

 


.




- , . :

1. .

2. , , , , .

3. ( ).

( , ).

(, ). , .

 

Var g:file;

const.

.. ( , )

, ..

Reset(f[,size]); - -, , .

Rewrite (f[,size])

, , , , . size - . - 128

Close(f);

. , --128 size,

 

Blockread(f:file; buf, count:word [;result:word]) f . count. . buf. - result .

Blockwrite(f:file; buf, count:word [;result:word])

-

Blockread(f:file; buf, count:word [;result:word])

Erase(f:file);

Rename(f:file;s:string); (s )

Getdir(disk:byte; s:string); s . =0( .) 1- . 2- .

Mkdir(s:string); (s )

Rmdir(s:string);

function FileExists(name: string): boolean;
True, name

 

 

.

 

 

.

 

Pascal

:

uses GraphABC,crt;

begin

setpixel(50,50,clgreen);

line(2,6,20,30);

Circle(80,80,70)

end.

, . GraphABC.

GraphABC

1.

2.

3.

4.

5.

6.

7.

8.

procedure SetPixel(x,y,color:integer);

- x y color

function GetPixel(x,y):integer;

- x y

procedure MoveTo(x,y:integer);

- x y

procedure LineTo(x,y:integer);

- x y

procedure Line(x1,y1,x2,y2:integer);

- x1 y1 x2 y2

procedure Circle(x,y,r:integer);

- . x y r

procedure Ellipse(x1,y1,x2,y2:integer);

-

procedure Rectangle(x1,y1,x2,y2:integer);

-

procedure RoundRect(x1,y1,x2,y2,w,h:integer);

- w h

 

procedure Arc(x,y,r,a1,a2:integer);

- x y r, a1 a2

procedure Pie(x,y,r,a1,a2:integer);

-

procedure Chord(x,y,r,a1,a2:ingerer);

-

procedure TextOut(x,y:integer; s:string);

- s x y

procedure FloodFill(x,y,color:ineger);

- x y

procedure FillRect(x1,x2,y1,y2:integer);

-

procedure Polygon(var a; n:integer);

- n a point(. )

procedure Polylince(var a; n:integer);

- n a point(. )

 

function RGB(r,g,b:integer):ColorType;

- 3 RGB

function GetRed(color:ColorType):integer;

-.

function GetGreen(color:ColorType):integer;

function GetBlue(color:ColorType):integer;

.

 

Function PenX:integer;

-

Function PenY:integer;

-

Procedure SetPenColor(color:integer);

- .

Function PenColor:integer;

- .

Procedure SetPenWidth(w:integer);

- .

Function PenWidth:integer;

- .

Procedure SetPenStyle(ps:integer);

- , ps.

Function PenStyle:integer;

- .

 

 

.

 

Procedure SetBrushColor(color:integer);

- .

Procedure BrushColor:integer;

- .

Procedure SetBrushPicture(fname:string);

- , , fname.

Procedure ClearBrushPicture;

- -, .

Procedure SetBrushStyle(bs:integer);

- , bs.

Function BrushStyle:integer;

- .

 

 

Procedure SetFontColor(color:integer);

-

Function FontColor:integer;

-

Procedure SetFontSize(sz:integer);

-

Function FontSize:integer;

-

Procedure SetFontName(name:string);

-

Function FontName:string;

-

Procedure SetFontStyle(fs:integer);

-

Function FontStyle:integer;

-

Function TextWidth(s:string):integer;

- s

Function TextHeight(s:string):integer;

- s .

 

.

 

( ), Picture. , .

 

 

Function LoadPicture(fname:string): integer;

- , .

Procedure SavePicture(n:integer;fname:string);

- .

Procedure DrawPicture(n,x,y:integer);

- x,y .

Procedure DrawPicture(n,x,y,w,h:integer);

- x,y , w h.

Procedure DrawPicture(n:integer;x,y:integer;r:Rect);

- x,y, r.

Procedure DrawPicture(n:integer;x,y,w,h:integer;r:Rect);

- x,y r, .

Procedure CupyRect(n:integer;dest:Rect;n1:integer;src:Rect);

- , src dest n.

Procedure DestroyPicture(n:integer);

- , .

Procedure SetPictureSize(n,w,h:integer);

- .

Function PictureWidth(n:integer):integer;

- .

Function PictureHeight(n:integer):integer;

- .

Function PictureTransparent(n:integer):Boolean;

- .

Function CreatePicture(w,h:integer):integer;

- h w .

Function CreatePictureFromRect(r:Rect):integer;

- r .

Function CreatePictureFromScreenBufferRect(r:rect):integer;

- r .

Procedure SetPictureTransparent(n:integer;b:boolean);

- .

Function ImageIntersect(n1,n2:integer):Boolean;

- , n1 n2, , . , .

Function StandardImageFolder:string;

- .

Procedure FlipPictureHorizontal(n);

- .

Procedure FlipPictureVertical(n);

- .

 

 





:


: 2015-10-21; !; : 564 |


:

:

- , - .
==> ...

1663 - | 1588 -


© 2015-2024 lektsii.org - -

: 0.04 .