- :
;
;
, .
, . .
:
- , , ;
- , .
- , .
-
- () , .
- - () , , ( ), .
, , .
, , , (. 2.1). , , . , , .
() , .
, . , , , .. .
, , (). , - . .
, . , - , .
|
|
, .
, .
, .
: . :
:
1. ().
2. (Y).
3. .
4. .
5. .
:
1. .
2. .
3. .
:
1. .
2. .
, . , . . . , , .
(), .
(). (.2.2), - (-) () () (. 2.3).
, .
, - . , .
. , , . , , , , ..
-, , . , , (), . . , , -: , .
, (), . , () ().
|
|
, ( ), . , , . . , , , , . , , () , ().
, , , .
.
-.
, . (, , , ) .
( -) , , . - , , ( ) - , .
, , .
2.2. -
. , . - , . , .
. , , , . , : ( ). () , . , , . , (), .
- , , . : (public) , ( ), (private) , . .
|
|
, : , , .
, . .
, - . , , , . , :
R - ;
X, Y - ;
Color - .
, , Draw. R, X, Y, Color.
, . , , (, ). . - R, X, Y, Color, Draw . : , . , .
. R, X, Y, Color, . , .
, . , , . .
- Move. , (, ). Move , . , .
, - ChangeColor. : - , .
( ), . - , , , Draw . , , R, X, Y, Color , . , , , .
, , , . - . , , , . . , , - .
|
|
. . , . Draw, Move ChangeColor, , . , , (, , ) (, , ), .. . .
" " , () - . ? (, . .) , , - ( , . .), . , , . , , .
, .. (), "" () (). .2.4. .
.2.4.
.
, -, Round.
Round :
R - ;
X, Y - ;
Color - .
Round:
Draw - ;
Move - ;
ChangeColor - .
, -. Head, - Body, a - Foot. Round. , (R, X, Y, Color) (Draw, Move, ChangeColor) .
, ( ). , .
, . , . , .
. , . - , -, Round. , , . - Eyes (), , Round, Blink (). Eyes , Round.
, . . Round, . . Eyes, Blink, , .. Eyes Round , , Blink. Eyes Round, , Round ( ) Eyes. . Eyes ( ) Round.
|
|
, , -, -. . 2.1.
,
: poly () morphos (). "" " ". (), . (), , . .
2.1
Eyes Round
Round () | |
R | |
X | |
Y | |
Color () | |
Draw () | |
Move () | |
ChangeColor | |
Eyes () | |
R | |
X | |
Y | |
Color | |
Draw | |
Move | |
ChangeColor | |
Blink () |
. , (, ), , (, , ). , , - (, ), .
Rect (rectangle - ), Round, Y - , R ( ). ( ). , , - Round, . Round , .. , . :
Top - ;
Left - ;
Height - ;
Width - .
. , ( ) , .
=80,
Left =20,
Height =40,
Width = 60.
Left + Width = 80, - Height = 40.
, ( - , - ): (20, 80), (80, 80), (20, 40), D(80, 40). .2.5 .
.2.5. ,
Round Rect . , . .. , Rect Draw , , Draw , Rect, , .
, Rect Draw. , Round, Draw , Rect - . .. Draw , . . . 2.6.
. 2.6. Draw Rect Round
- . .
- ( ). .
- , , .
- () , . , . , .
- - , , ( ), .
- , , . , , .
- , . , , , .. .
- , , (). , - . .
- , . , - , .
- :
, .
, .
-.
1