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

UptoLike

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

pmCopy ɰɜɟɬ ɥɢɧɢɣ ɨɩɪɟɞɟɥɹɟɬɫɹ ɫɜɨɣɫɬɜɨɦ Color ɩɟɪɚ
pmNotCopy ɢɧɜɟɪɫɢɹ ɰɜɟɬɚ ɩɟɪɚ. ɋɜɨɣɫɬɜɨ Style ɢɝɧɨɪɢɪɭɟɬɫɹ
pmMergePenNot ɤɨɦɛɢɧɚɰɢɹ ɰɜɟɬɚ ɩɟɪɚ ɢ ɢɧɜɟɪɫɢɨɧɧɨɝɨ ɰɜɟɬɚ ɮɨɧɚ
pmMaskPenNot ɤɨɦɛɢɧɚɰɢɹ ɨɛɳɢɯ ɰɜɟɬɨɜ ɞɥɹ ɩɟɪɚ ɢ ɢɧɜɟɪɫɢɨɧɧɨɝɨ
ɰɜɟɬɚ ɮɨɧɚ. ɋɜɨɣɫɬɜɨ Style ɢɝɧɨɪɢɪɭɟɬɫɹ
pmMergeNotPen ɤɨɦɛɢɧɚɰɢɹ ɢɧɜɟɪɫɢɨɧɧɨɝɨ ɰɜɟɬɚ ɩɟɪɚ ɢ ɮɨɧɚ
pmMaskNotPen ɤɨɦɛɢɧɚɰɢɹ ɨɛɳɢɯ ɰɜɟɬɨɜ ɞɥɹ ɢɧɜɟɪɫɢɨɧɧɨɝɨ ɰɜɟɬɚ
ɩɟɪɚ ɢ ɮɨɧɚ. ɋɜɨɣɫɬɜɨ Style ɢɝɧɨɪɢɪɭɟɬɫɹ
pmMerge ɤɨɦɛɢɧɚɰɢɹ ɰɜɟɬɨɜ ɩɟɪɚ ɢ ɮɨɧɚ
pmNotMerge ɢɧɜɟɪɫɢɹ ɰɜɟɬɨɜ ɩɟɪɚ ɢ ɮɨɧɚ. ɋɜɨɣɫɬɜɨ Style ɢɝɧɨɪɢ-
ɪɭɟɬɫɹ
pmMask ɨɛɳɢɟ ɰɜɟɬɚ ɩɟɪɚ ɢ ɮɨɧɚ
pmNotMask ɢɧɜɟɪɫɢɹ ɨɛɳɢɯ ɰɜɟɬɨɜ ɩɟɪɚ ɢ ɮɨɧɚ
pmXor ɨɛɴɟɞɢɧɟɧɢɟ ɰɜɟɬɨɜ ɩɟɪɚ ɢ ɮɨɧɚ ɨɩɟɪɚɰɢɟɣ XOR
pinNotXor ɢɧɜɟɪɫɢɹ ɨɛɴɟɞɢɧɟɧɢɹ ɰɜɟɬɨɜ ɩɟɪɚ ɢ ɮɨɧɚ ɨɩɟɪɚɰɢɟɣ
XOR
ɋɬɢɥɢ ɥɢɧɢɣ ɩɨɤɚɡɚɧɵ ɧɚ ɪɢɫ. 4.1.
Ɋɢɫ. 4.1. ɋɬɢɥɢ ɥɢɧɢɣ
Ʉɥɚɫɫ TBrush
Ɉɛɴɟɤɬɵ ɤɥɚɫɫɚ TBrush (ɤɢɫɬɢ) ɫɥɭɠɚɬ ɞɥɹ ɡɚɩɨɥɧɟɧɢɹ ɜɧɭɬɪɟɧɧɟɝɨ
ɩɪɨɫɬɪɚɧɫɬɜɚ ɡɚɦɤɧɭɬɵɯ ɮɢɝɭɪ. Ɉɫɧɨɜɧɵɟ ɫɜɨɣɫɬɜɚ ɤɥɚɫɫɚ ɩɪɟɞɫɬɚɜɥɟɧɵ ɜ
ɬɚɛɥ. 7.3.
Ɍɚɛɥɢɰɚ 4.3
ɋɜɨɣɫɬɜɚ ɤɥɚɫɫɚ TBrush
ɋɜɨɣɫɬɜɨ Ɉɩɢɫɚɧɢɟ
property Bitmap: TBitmap; ɋɨɞɟɪɠɢɬ ɪɚɫɬɪɨɜɨɟ ɢɡɨɛɪɚɠɟɧɢɟ, ɤɨɬɨɪɨɟ
ɛɭɞɟɬ ɢɫɩɨɥɶɡɨɜɚɬɶɫɹ ɤɢɫɬɶɸ ɞɥɹ ɡɚɩɨɥɧɟ-
ɧɢɹ. ȿɫɥɢ ɷɬɨ ɫɜɨɣɫɬɜɨ ɨɩɪɟɞɟɥɟɧɨ, ɫɜɨɣɫɬ-
ɜɚ Color ɢ Style ɢɝɧɨɪɢɪɭɸɬɫɹ
property Color: TColor; ɐɜɟɬ ɤɢɫɬɢ
property Style: TBrushStyle; ɋɬɢɥɶ ɤɢɫɬɢ
80
pmCopy        ɰɜɟɬ ɥɢɧɢɣ ɨɩɪɟɞɟɥɹɟɬɫɹ ɫɜɨɣɫɬɜɨɦ Color ɩɟɪɚ
pmNotCopy     ɢɧɜɟɪɫɢɹ ɰɜɟɬɚ ɩɟɪɚ. ɋɜɨɣɫɬɜɨ Style ɢɝɧɨɪɢɪɭɟɬɫɹ
pmMergePenNot ɤɨɦɛɢɧɚɰɢɹ ɰɜɟɬɚ ɩɟɪɚ ɢ ɢɧɜɟɪɫɢɨɧɧɨɝɨ ɰɜɟɬɚ ɮɨɧɚ
pmMaskPenNot  ɤɨɦɛɢɧɚɰɢɹ ɨɛɳɢɯ ɰɜɟɬɨɜ ɞɥɹ ɩɟɪɚ ɢ ɢɧɜɟɪɫɢɨɧɧɨɝɨ
              ɰɜɟɬɚ ɮɨɧɚ. ɋɜɨɣɫɬɜɨ Style ɢɝɧɨɪɢɪɭɟɬɫɹ
pmMergeNotPen ɤɨɦɛɢɧɚɰɢɹ ɢɧɜɟɪɫɢɨɧɧɨɝɨ ɰɜɟɬɚ ɩɟɪɚ ɢ ɮɨɧɚ
pmMaskNotPen ɤɨɦɛɢɧɚɰɢɹ ɨɛɳɢɯ ɰɜɟɬɨɜ ɞɥɹ ɢɧɜɟɪɫɢɨɧɧɨɝɨ ɰɜɟɬɚ
              ɩɟɪɚ ɢ ɮɨɧɚ. ɋɜɨɣɫɬɜɨ Style ɢɝɧɨɪɢɪɭɟɬɫɹ
pmMerge       ɤɨɦɛɢɧɚɰɢɹ ɰɜɟɬɨɜ ɩɟɪɚ ɢ ɮɨɧɚ
pmNotMerge    ɢɧɜɟɪɫɢɹ ɰɜɟɬɨɜ ɩɟɪɚ ɢ ɮɨɧɚ. ɋɜɨɣɫɬɜɨ Style ɢɝɧɨɪɢ-
              ɪɭɟɬɫɹ
pmMask        ɨɛɳɢɟ ɰɜɟɬɚ ɩɟɪɚ ɢ ɮɨɧɚ
pmNotMask     ɢɧɜɟɪɫɢɹ ɨɛɳɢɯ ɰɜɟɬɨɜ ɩɟɪɚ ɢ ɮɨɧɚ
pmXor         ɨɛɴɟɞɢɧɟɧɢɟ ɰɜɟɬɨɜ ɩɟɪɚ ɢ ɮɨɧɚ ɨɩɟɪɚɰɢɟɣ XOR
pinNotXor     ɢɧɜɟɪɫɢɹ ɨɛɴɟɞɢɧɟɧɢɹ ɰɜɟɬɨɜ ɩɟɪɚ ɢ ɮɨɧɚ ɨɩɟɪɚɰɢɟɣ
              XOR
ɋɬɢɥɢ ɥɢɧɢɣ ɩɨɤɚɡɚɧɵ ɧɚ ɪɢɫ. 4.1.




       Ɋɢɫ. 4.1. ɋɬɢɥɢ ɥɢɧɢɣ
     Ʉɥɚɫɫ TBrush
      Ɉɛɴɟɤɬɵ ɤɥɚɫɫɚ TBrush (ɤɢɫɬɢ) ɫɥɭɠɚɬ ɞɥɹ ɡɚɩɨɥɧɟɧɢɹ ɜɧɭɬɪɟɧɧɟɝɨ
ɩɪɨɫɬɪɚɧɫɬɜɚ ɡɚɦɤɧɭɬɵɯ ɮɢɝɭɪ. Ɉɫɧɨɜɧɵɟ ɫɜɨɣɫɬɜɚ ɤɥɚɫɫɚ ɩɪɟɞɫɬɚɜɥɟɧɵ ɜ
ɬɚɛɥ. 7.3.
                                                              Ɍɚɛɥɢɰɚ 4.3
                          ɋɜɨɣɫɬɜɚ ɤɥɚɫɫɚ TBrush
           ɋɜɨɣɫɬɜɨ                             Ɉɩɢɫɚɧɢɟ
 property Bitmap: TBitmap;    ɋɨɞɟɪɠɢɬ ɪɚɫɬɪɨɜɨɟ ɢɡɨɛɪɚɠɟɧɢɟ, ɤɨɬɨɪɨɟ
                              ɛɭɞɟɬ ɢɫɩɨɥɶɡɨɜɚɬɶɫɹ ɤɢɫɬɶɸ ɞɥɹ ɡɚɩɨɥɧɟ-
                              ɧɢɹ. ȿɫɥɢ ɷɬɨ ɫɜɨɣɫɬɜɨ ɨɩɪɟɞɟɥɟɧɨ, ɫɜɨɣɫɬ-
                              ɜɚ Color ɢ Style ɢɝɧɨɪɢɪɭɸɬɫɹ
 property Color: TColor;      ɐɜɟɬ ɤɢɫɬɢ
 property Style: TBrushStyle; ɋɬɢɥɶ ɤɢɫɬɢ


                                    80