Введение в технологию программирования. Ч.1. Среда объектно-ориентированного программирования Delphi. Коржов Е.Н - 84 стр.

UptoLike

Составители: 

84
procedure Polygon
(Points: array of TPoint);
ȼɵɱɟɪɱɢɜɚɟɬ ɩɟɪɨɦ ɦɧɨɝɨɭɝɨɥɶɧɢɤ ɩɨ ɬɨɱɤɚɦ,
ɡɚɞɚɧɧɵɦ ɜ ɦɚɫɫɢɜɟ Points. Ʉɨɧɟɱɧɚɹ ɬɨɱɤɚ ɫɨ-
ɟɞɢɧɹɟɬɫɹ ɫ ɧɚɱɚɥɶɧɨɣ ɢ ɦɧɨɝɨɭɝɨɥɶɧɢɤ ɡɚɩɨɥ-
ɧɹɟɬɫɹ ɤɢɫɬɶɸ. Ȼɟɡ ɡɚɩɨɥɧɟɧɢɹ – Polyline
procedure Polyline
(Points: array of TPoint);
ȼɵɱɟɪɱɢɜɚɟɬ ɩɟɪɨɦ ɥɨɦɚɧɭɸ ɩɪɹɦɭɸ ɩɨ ɬɨɱ-
ɤɚɦ, ɡɚɞɚɧɧɵɦ ɜ ɦɚɫɫɢɜɟ Points
procedure Rectan gle(XI,
Yl, X2, Y2: Integer);
ȼɵɱɟɪɱɢɜɚɟɬ ɢ ɡɚɩɨɥɧɹɟɬ ɩɪɹɦɨɭɝɨɥɶɧɢɤ (XI,
Yl)–S(X2, Y2). Ⱦɥɹ ɜɵɱɟɪɱɢɜɚɧɢɹ ɛɟɡ ɡɚɩɨɥɧɟ-
ɧɢɹ ɢɫɩɨɥɶɡɭɣɬɟ FrameRect ɢɥɢ Polyline
procedure Refresh; ɍɫɬɚɧɚɜɥɢɜɚɟɬ ɜ ɤɚɧɜɟ ɭɦɚɥɱɢɜɚɟɦɵɟ ɲɪɢɮɬ ɢ
ɤɢɫɬɶ
procedure RoundRect(Xl,
Yl, X2,Y2, X3, Y3: Inte
ger) ;
ȼɵɱɟɪɱɢɜɚɟɬ ɢ ɡɚɩɨɥɧɹɟɬ ɩɪɹɦɨɭɝɨɥɶɧɢɤ
(XI,Yl) – (X2, Y2) ɫɨ ɫɤɪɭɝɥɟɧɧɵɦɢ ɭɝɥɚɦɢ.
ɉɪɹɦɨɭɝɨɥɶɧɢɤ (XI, Yl)–(X3, Y3) ɨɩɪɟɞɟɥɹɟɬ
ɞɭɝɭ ɷɥɥɢɩɫɚ ɞɥɹ ɨɤɪɭɝɥɟɧɢɹ ɭɝɥɨɜ
procedure Stretch Draw
(const Rect:TRect;
Graphic:TGraphic );
ȼɵɱɟɪɱɢɜɚɟɬ ɢ ɩɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ ɦɚɫɲɬɚɛɢ-
ɪɭɟɬ ɝɪɚɮɢɱɟɫɤɢɣ ɨɛɴɟɤɬ Graphic ɬɚɤ, ɱɬɨɛɵ ɨɧ
ɩɨɥɧɨɫɬɶɸ ɡɚɧɹɥ ɩɪɹɦɨɭɝɨɥɶɧɢɤ Rect
function TextExtent
(const
Text:String):TSize;
ȼɨɡɜɪɚɳɚɟɬ ɲɢɪɢɧɭ ɢ ɜɵɫɨɬɭ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ,
ɨɯɜɚɬɵɜɚɸɳɟɝɨ ɬɟɤɫɬɨɜɭɸ ɫɬɪɨɤɭ Text
function TextHeight
(const Text: String):
Intege;
ȼɨɡɜɪɚɳɚɟɬ ɜɵɫɨɬɭ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ, ɨɯɜɚɬɵ-
ɜɚɸɳɟɝɨ ɬɟɤɫɬɨɜɭɸ ɫɬɪɨɤɭ Text
procedure TextOut(X, Y:
Integer; const Text:
String);
ȼɵɜɨɞɢɬ ɬɟɤɫɬɨɜɭɸ ɫɬɪɨɤɭ Text ɬɚɤ, ɱɬɨɛɵ ɥɟ-
ɜɵɣ ɜɟɪɯɧɢɣ ɭɝɨɥ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ, ɨɯɜɚɬɵ-
ɜɚɸɳɟɝɨ ɬɟɤɫɬ, ɪɚɫɩɨɥɚɝɚɥɫɹ ɜ ɬɨɱɤɟ (X, Y)
procedure
TextRect(Rect: TRect;
X, Y:
Integer; const Text:
String);
ȼɵɜɨɞɢɬ ɬɟɤɫɬɨɜɭɸ ɫɬɪɨɤɭ Text ɬɚɤ, ɱɬɨɛɵ ɥɟ-
ɜɵɣ ɜɟɪɯɧɢɣ ɭɝɨɥ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ, ɨɯɜɚɬɵ-
ɜɚɸɳɟɝɨ ɬɟɤɫɬ, ɪɚɫɩɨɥɚɝɚɥɫɹ ɜ ɬɨɱɤɟ (ɯ, Y). ȿɫ-
ɥɢ ɩɪɢ ɷɬɨɦ ɤɚɤɚɹ-ɥɢɛɨ ɱɚɫɬɶ ɧɚɞɩɢɫɢ ɜɵɯɨɞɢɬ
ɢɡ ɝɪɚɧɢɰ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ Rect, ɨɧɚ ɨɬɫɟɤɚɟɬɫɹ
ɢ ɧɟ ɛɭɞɟɬ ɜɢɞɧɚ
function TextWidth
(const Text:String):
Integer;
ȼɨɡɜɪɚɳɚɟɬ ɲɢɪɢɧɭ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ, ɨɯɜɚɬɵ-
ɜɚɸɳɟɝɨ ɬɟɤɫɬɨɜɭɸ ɫɬɪɨɤɭ Text
function TryLock:
Boolean;
ɉɵɬɚɟɬɫɹ ɡɚɛɥɨɤɢɪɨɜɚɬɶ ɤɚɧɜɭ. ȿɫɥɢ ɨɧɚ ɧɟ ɡɚ-
ɛɥɨɤɢɪɨɜɚɧɚ ɞɪɭɝɢɦ ɩɨɬɨɤɨɦ ɤɨɦɚɧɞ, – True, ɜ
ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ ɧɢɱɟɝɨ ɧɟ ɞɟɥɚɟɬ ɢ ɜɨɡɜɪɚɳɚ-
ɟɬ False
procedure Unlock; ɍɦɟɧɶɲɚɟɬ ɧɚ 1 ɫɱɟɬɱɢɤ ɛɥɨɤɢɪɨɜɨɤ ɤɚɧɜɵ
procedure Polygon          ȼɵɱɟɪɱɢɜɚɟɬ ɩɟɪɨɦ ɦɧɨɝɨɭɝɨɥɶɧɢɤ ɩɨ ɬɨɱɤɚɦ,
(Points: array of TPoint); ɡɚɞɚɧɧɵɦ ɜ ɦɚɫɫɢɜɟ Points. Ʉɨɧɟɱɧɚɹ ɬɨɱɤɚ ɫɨ-
                           ɟɞɢɧɹɟɬɫɹ ɫ ɧɚɱɚɥɶɧɨɣ ɢ ɦɧɨɝɨɭɝɨɥɶɧɢɤ ɡɚɩɨɥ-
                           ɧɹɟɬɫɹ ɤɢɫɬɶɸ. Ȼɟɡ ɡɚɩɨɥɧɟɧɢɹ – Polyline
procedure Polyline         ȼɵɱɟɪɱɢɜɚɟɬ ɩɟɪɨɦ ɥɨɦɚɧɭɸ ɩɪɹɦɭɸ ɩɨ ɬɨɱ-
(Points: array of TPoint); ɤɚɦ, ɡɚɞɚɧɧɵɦ ɜ ɦɚɫɫɢɜɟ Points
procedure Rectan gle(XI, ȼɵɱɟɪɱɢɜɚɟɬ ɢ ɡɚɩɨɥɧɹɟɬ ɩɪɹɦɨɭɝɨɥɶɧɢɤ (XI,
Yl, X2, Y2: Integer);      Yl)–S(X2, Y2). Ⱦɥɹ ɜɵɱɟɪɱɢɜɚɧɢɹ ɛɟɡ ɡɚɩɨɥɧɟ-
                           ɧɢɹ ɢɫɩɨɥɶɡɭɣɬɟ FrameRect ɢɥɢ Polyline
procedure Refresh;         ɍɫɬɚɧɚɜɥɢɜɚɟɬ ɜ ɤɚɧɜɟ ɭɦɚɥɱɢɜɚɟɦɵɟ ɲɪɢɮɬ ɢ
                           ɤɢɫɬɶ
procedure RoundRect(Xl, ȼɵɱɟɪɱɢɜɚɟɬ ɢ ɡɚɩɨɥɧɹɟɬ ɩɪɹɦɨɭɝɨɥɶɧɢɤ
Yl, X2,Y2, X3, Y3: Inte (XI,Yl) – (X2, Y2) ɫɨ ɫɤɪɭɝɥɟɧɧɵɦɢ ɭɝɥɚɦɢ.
ger) ;                     ɉɪɹɦɨɭɝɨɥɶɧɢɤ (XI, Yl)–(X3, Y3) ɨɩɪɟɞɟɥɹɟɬ
                           ɞɭɝɭ ɷɥɥɢɩɫɚ ɞɥɹ ɨɤɪɭɝɥɟɧɢɹ ɭɝɥɨɜ
procedure Stretch Draw ȼɵɱɟɪɱɢɜɚɟɬ ɢ ɩɪɢ ɧɟɨɛɯɨɞɢɦɨɫɬɢ ɦɚɫɲɬɚɛɢ-
(const Rect:TRect;         ɪɭɟɬ ɝɪɚɮɢɱɟɫɤɢɣ ɨɛɴɟɤɬ Graphic ɬɚɤ, ɱɬɨɛɵ ɨɧ
Graphic:TGraphic );        ɩɨɥɧɨɫɬɶɸ ɡɚɧɹɥ ɩɪɹɦɨɭɝɨɥɶɧɢɤ Rect
function TextExtent        ȼɨɡɜɪɚɳɚɟɬ ɲɢɪɢɧɭ ɢ ɜɵɫɨɬɭ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ,
(const                     ɨɯɜɚɬɵɜɚɸɳɟɝɨ ɬɟɤɫɬɨɜɭɸ ɫɬɪɨɤɭ Text
Text:String):TSize;
function TextHeight        ȼɨɡɜɪɚɳɚɟɬ ɜɵɫɨɬɭ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ, ɨɯɜɚɬɵ-
(const Text: String):      ɜɚɸɳɟɝɨ ɬɟɤɫɬɨɜɭɸ ɫɬɪɨɤɭ Text
Intege;
procedure TextOut(X, Y: ȼɵɜɨɞɢɬ ɬɟɤɫɬɨɜɭɸ ɫɬɪɨɤɭ Text ɬɚɤ, ɱɬɨɛɵ ɥɟ-
Integer; const Text:       ɜɵɣ ɜɟɪɯɧɢɣ ɭɝɨɥ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ, ɨɯɜɚɬɵ-
String);                   ɜɚɸɳɟɝɨ ɬɟɤɫɬ, ɪɚɫɩɨɥɚɝɚɥɫɹ ɜ ɬɨɱɤɟ (X, Y)
procedure                  ȼɵɜɨɞɢɬ ɬɟɤɫɬɨɜɭɸ ɫɬɪɨɤɭ Text ɬɚɤ, ɱɬɨɛɵ ɥɟ-
TextRect(Rect: TRect;      ɜɵɣ ɜɟɪɯɧɢɣ ɭɝɨɥ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ, ɨɯɜɚɬɵ-
X, Y:                      ɜɚɸɳɟɝɨ ɬɟɤɫɬ, ɪɚɫɩɨɥɚɝɚɥɫɹ ɜ ɬɨɱɤɟ (ɯ, Y). ȿɫ-
Integer; const Text:       ɥɢ ɩɪɢ ɷɬɨɦ ɤɚɤɚɹ-ɥɢɛɨ ɱɚɫɬɶ ɧɚɞɩɢɫɢ ɜɵɯɨɞɢɬ
String);                   ɢɡ ɝɪɚɧɢɰ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ Rect, ɨɧɚ ɨɬɫɟɤɚɟɬɫɹ
                           ɢ ɧɟ ɛɭɞɟɬ ɜɢɞɧɚ
function TextWidth         ȼɨɡɜɪɚɳɚɟɬ ɲɢɪɢɧɭ ɩɪɹɦɨɭɝɨɥɶɧɢɤɚ, ɨɯɜɚɬɵ-
(const Text:String):       ɜɚɸɳɟɝɨ ɬɟɤɫɬɨɜɭɸ ɫɬɪɨɤɭ Text
Integer;
function TryLock:          ɉɵɬɚɟɬɫɹ ɡɚɛɥɨɤɢɪɨɜɚɬɶ ɤɚɧɜɭ. ȿɫɥɢ ɨɧɚ ɧɟ ɡɚ-
Boolean;                   ɛɥɨɤɢɪɨɜɚɧɚ ɞɪɭɝɢɦ ɩɨɬɨɤɨɦ ɤɨɦɚɧɞ, – True, ɜ
                           ɩɪɨɬɢɜɧɨɦ ɫɥɭɱɚɟ ɧɢɱɟɝɨ ɧɟ ɞɟɥɚɟɬ ɢ ɜɨɡɜɪɚɳɚ-
                           ɟɬ False
procedure Unlock;          ɍɦɟɧɶɲɚɟɬ ɧɚ 1 ɫɱɟɬɱɢɤ ɛɥɨɤɢɪɨɜɨɤ ɤɚɧɜɵ


                                   84