графические возможности языка программирования

  • Published on
    14-Jan-2017

  • View
    448

  • Download
    1

Transcript

7

: , ;

GraphABC.uses GraphABC;

Program cl;uses GraphABC; Begin

End.

PasalABC ( ) 640 400 .

SetWindowSize(x,y);

050100150200250300350400640X50100150200250300400Y

5

ClearWindow; - .ClearWindow(color); - .

SetPixel(x,y,color) - (x,y) color program tochka;uses GraphABC;begin SetPixel(300,200,clred);end.

Line(x1,y1,x2,y2) - (x1,y1) (x2,y2). Program liniay; uses GraphABC;begin line(100,50,500,250);end.

x1,y1x2,y2

program prim;uses GraphABC;begin Setpencolor(clred); SetPenStyle(1); {1 - } Line(10,100,350,100); SetPenStyle(2); {2 - } Line(10,125,350,125); SetPenStyle(3); {3 - -} Line(10,150,350,150);end.

SetPenStyle(); - , .

Program liniay;uses GraphABC;begin setpenwidth(20); setpencolor(clred); line(30,30,400,350);end.

SetPenWidth(n) - () , n .

clBlack clPurple clWhite clMaroon - clRed clNavy - clGreen clBrown clBlue clSkyBlue clYellow clCream clAqua clOlive clFuchsia clTeal - clGray - clLime - clMoneyGreen clLtGray - clDkGray -clMedGray clSilver

Random(16777215)

SetPenColor(color) - , color.

Program liniay;uses GraphABC;begin setpencolor(clred); line(30,30,400,350);end.

Rectangle(x1,y1,x2,y2) - , (x1,y1) (x2,y2). Program pryamougolnik;uses GraphABC;begin Rectangle(50,50,200,200);end.

x1,y1x2,y2

FloodFill(x,y,color) - color, (x,y). Program pryamougolnik;uses GraphABC;begin Rectangle(50,50,200,200); FloodFill(100,100,clBlue);end.

x1,y1x2,y2

SetBrushColor(color) . , .Program zalivka_kist;uses GraphABC;BeginSetBrushColor(clGreen);Rectangle(50,50,300,300); end.

SetBrushPicture(fname) , fname, .uses GraphABC;begin SetBrushPicture('brush4.bmp');Ellipse(0,0,640,400);end.

Circle(x,y,r) - (x,y) r.

Program circle;uses GraphABC;begin Circle(500,200,100); FloodFill(500,200,clred);end.

x1,y1

r

Arc(x,y,r,a1,a2) - (x,y) r, , a1 a2 OX (a1 a2 , ).

Program duga;uses GraphABC;BeginSetPenWidth(10);Arc(300,250,150,45,135);end.

x,y

r

Pie(x,y,r,a1,a2) , ( , Arc). Program sector;uses GraphABC;beginPie(300,200,100,0,90);FloodFill(300+10,200-10,clAqua);end.

1

14 , 1-4, . 2

Recommended

View more >