Основные графические процедуры Паскаля

  • Published on
    07-Jan-2016

  • View
    48

  • Download
    0

DESCRIPTION

. : (. 2). . - PowerPoint PPT Presentation

Transcript

  • : (. 2)

  • : . , . , .

  • , . , .. . , .. .

  • : Turbo Pascal . GRAPH.

  • : CRAPH : uses graph; : var GraphDriver,GraphMode,GraphColor:integer; begin GraphDriver : =Detect; InitGraph(GraphDriver,GraphMode,);

    .

  • CloseGraph , . . , , .

  • 1. . .

    : , , .

  • . , (0,0). (639,0), Y (0,349).

  • PutPixel (X,Y, Color); Color X, Y.PutPixel(10,30,red) PutPixel(10,30,4),

  • Line (X1, Y1, X2, Y2); (X1, Y1) (X2, Y2).Line (5, 5, 100, 100);

  • 1. (50,80,100,100) (200,200).program z1; uses graph; var GraphDriver,GraphMode,GraphColor: integer; beginGraphDriver : =Detect; InitGraph(GraphDriver,GraphMode,); PutPixel(200,200,red); Line(50,80,100,100); Readln; CloseGraph; End.

  • , , .

  • 2. . . .: , .

  • black0blue1green2cyan3red4magenta5brown6-LightGray7-DarkGray8-LightBlue9-LightGreen10-LightCyan11-LightRed12-LightMagenta13yellow14white15

  • SetLineStyle(, , ); . : SetLineStyle(CenterLn, 2, 3);

  • SolidLn0NormWidth1DottedLn1 ThickWidth3CenterLn2 DashedLn3

  • 1 , : ) ( ). ) ( , ). ) ( , - , - )

  • 2 : , , .

  • 3. : .

  • Rectangle (X1, Y1, X2, Y2); , . X1, Y1 ; X2, Y2 - .Rectangle (100, 120, 200, 100);

  • Bar (X1, Y1, X2, Y2); , (, ).X1, Y1, X2, Y2 .

  • Bar3D (X1, Y1, X2, Y2, Glubina,Top); , . X1, Y1, X2, Y2 ; Glubina ( ); Top ( True , False ).

  • : Line; Rectangle; Bar; Bar3D.

  • 4. , : , , , .

  • Circle (X, Y, R); R (X, Y).

  • Arc (X,Y,U1,U2,R); . X, Y ; U1 , , ; U2 , , U1; R .

  • Ellipse (X, Y, U1, U2, XR, YR); . X, Y ; U1, U2 (. Arc); XR, XY .

  • Fill Ellipse (X, Y, U1, U2, XR, YR); , X, Y XR, YR .

  • Sector (X, Y, U1, U2, XR, YR); XR, YR X, Y U1 U2.

  • for.

  • , 15 : =100; : =100; R: =5; Dr: =5; For i: =1 to 15 do beginSetColor (i); Circle(x,y,r); R:=r+dr; End;

  • : , , . , ( ). , 10 , 20, 15. ( ). 5. : , ( ).

  • 1. : , , .

  • 2. , ( ).

  • 3. : , ( ).

  • 5: : , .

  • OutText(); . , .

  • OutTextXY(x,y,); x y.

  • , , . , CHR. .

  • SmallFont, SansSerifFont, GothicFont , .

  • SetTextStyle (Font; Direction,CharSize);Font- (. ); Direction- ( - 0, - 1); CharSize- .

    SetTextStyle(0,1,1); - .SetTextStyle(0,0,2); - .

  • SetTextJustify(Horiz,Vert);

    Horiz- Vert- .

  • LeftText CenterTextRightText012 BoottomText CenterTextTopText012

  • SetTextJustify(CenterText,CenterText);

    SetTextJustify(1,0);

  • 1. :) , , ;

  • 1. :) , ;

  • 1. :) ( , ), ( , ).

  • ", , " : " . ": http://festival.1september.ru/articles/313964/

Recommended

View more >