.


:




:

































 

 

 

 


1.




1-8

 

 

 

230100.62

 

 

,2012

 

1. . 4

2,3. 11

4,5 . 20

6 -. 25

7 . 28

8. 33

9. . 37


1.

:

− Paint;

− Pascal - BGI.

- , . , , . :

- ;

- (2D- 3D -) (, , , , ..);

- ;

- ;

- , .

:

− "", "", "", " ", , , , ;

− ;

− ("", "", , "" ..);

− ( ) , , .

Paint - . Windows. . ( .bmp).

. , , : . :

1. Paint. , : ( ) - , ( )- .

2. . 300 - 200 . .

3. , - .

4. Shift . Shift.

5. . - .

6. Shift .

7. , .

8. , , . Ctrl+X .

9. Ctrl+V ( ).

10. . , .

11. 10-11, .

12. .

13. . V. .

14. V .

15. , .

16. Scheme.bmp.

, .

() . , , , ( 75 ) . , , . , ( ), , .

- . - 2D-. , - , . :

- ( )

- ( )

- ( )

- ( ).

, . Turbo Pascal BGI - Borland's Graphics Interface ( ) . , . Graph, uses Graph;

BGI:

1.

procedure InitGraph(var Dr, Mode:integer; DrPath:string) - ; .

pp: Dr - , (VGA, ) Detect, .

Mode - , (, VGAHi) . Dr=Detect, Mode .

DrPatch - (,"d:\tp7\bgi")

function GraphResult: integer - ( grOk )

procedure CloseGraph - , , .

function GetMaxX: integer; function GetMaxY: integer - X Y- .

Function GetGraphMode: integer -

procedure ClearViewPort - .

 

2.

 

Procedure PutPixel(x,y: integer; col: word) - (x,y) col

function GetPixel(x,y: integer): word - (x,y).

 

3.

procedure SetColor(col:word) - .

procedure SetLineStyle(style,pattern,width: word) - (style) (width) .

(style=SolidLn) . , style=UserBitLn, , (pattern= , 1 , , 0 - ).

procedure Line(x1,y1,x2,y2: integer) - (x1,y1) (x2,y2).

procedure Circle(x,y,r: integer) - r (x,y).

procedure Arc(x, y, StartAngle, EndAngle, r: integer) - r (x,y), StatrAngle EndAngle.

procedure Ellipse(x, y, StartAngle, EndAngle, rx, ry: integer) - (x,y) rx, ry, StatrAngle EndAngle.

 

4.

 

procedure SetFillStyle(pattern, col: word) - ( ).

procedure SetFillPattern (pattern: FillPatternType, col: word) - ( ). FillPatternType: typeFillPatternType = array [1..8] of byte; : SolidFill ( ), LineFill, SlashFill .. pattern=UserFill - SetFillPattern.

procedure Bar(x1,y1,x2,y2: integer) - (x1,y1) (x2,y2) .

procedure FloodFill(x,y: integer, BordCol: word) - , BordCol (x,y).

 

5.

 

procedure SetTextStyle (font, direction, size: word) . font - : DefaultFont - 8*8 . TriplexFont, GothicFont, SansSerifFont, SmallFont - , Turbo Pascal ( CHR, ). direction - :HorizDir - VertDir - . size - (1,2,...,10), .

procedure OutTextXY(x,y: integer; text: string) - (text) , (x,y) .

 

6.

, .

procedure SetPalette (col: word; ColVal: ShortInt) - col ColVal).

procedure SetRGBPalette (col, RedVal, GreenVal, BlueVal: integer) - col RGB-).

7.

procedure SetVisualPage (page: word) - ( ) page ( 0).

procedure SetActivePage (page: word) - ( ) page ( 0).

 

:

uses Graph,crt;

var

grDriver: Integer; grMode: Integer;

procedure derevo(x,y:integer);{ }

begin

setfillstyle(1,4); bar(x,y,x+10,y-100); { }

setcolor(green); ellipse(x+5,y-160,0,360,20,60); ellipse(x+5,y-160,0,360,19,59);

setfillstyle(1,10); floodfill(x+5,y-160,green);

end;

begin

grDriver:= Detect;

InitGraph(grDriver, grMode,'c:\kg\tp7\bgi');{ }

setcolor(15); { }

setlinestyle(0,0,1); { }

line(0,300,640,300);{ (0,300) (640,300)}

setfillstyle(9,10); floodfill(10,400,15); {}

setfillstyle(1,1); floodfill(10,10,15); derevo(50,350); derevo(100,400); derevo(160,310); derevo(200,450); derevo(280,330);setcolor(yellow); circle(540,100,50); {}

setfillstyle(1,yellow); floodfill(540,100,yellow); setfillstyle(1,15); setcolor(15); fillellipse(500,150,25,25);{ }

fillellipse(530,130,30,30); fillellipse(550,150,20,20); fillellipse(530,160,50,20); settextstyle(0,0,2); { }

outtextxy(500,450,'Park'); {} readkey; { }

end.

:

1. Paint , - bmp.

2. GRAPH TURBO PASCAL PASCAL c BGI ( ).

 

 

.

 

 

4. , - 2 .

 

:

 

1. , , , , , ?

2. TurboPascal ?

3. , BGI?

4. ?

5. , ?

 

 

1. , . . : , . [] / . . , . . . - .: -, 1996. - 287c.: .

2. , . . : [] / . . , . . , . . ; . . . . - .: , 1996. - 176c.: . - ( ).

 






:


: 2017-01-28; !; : 969 |


:

:

80% - .
==> ...

1712 - | 1560 -


© 2015-2024 lektsii.org - -

: 0.047 .