Compartilhar via


DrawMode Property

Determines, in conjunction with the color properties, how a shape or line is displayed on screen. Available at design time and run time.

Object.DrawMode[ = nMode]

Property Values

  • nMode
    The settings for the DrawMode property are:
    Setting Description
    1 Blackness Pen. Shape is drawn black.
    2 NotMerge Pen. Inverse of setting 15.
    3 Mask Not Pen. Combination of the colors common to the BackColor and the inverse of the ForeColor.
    4 Not Copy Pen. Inverse of setting 13.
    5 Mask Pen Not. Combination of the colors common to both the ForeColor and the inverse of the BackColor.
    6 Invert. Inverse of the BackColor.
    7 XOR Pen. Combination of the colors in the ForeColor and in the BackColor, but not in both.
    8 Not Mask Pen. Inverse of setting 9.
    9 Mask Pen. Combination of the colors common to both the ForeColor and the BackColor.
    10 Not XOR Pen. Inverse of setting 7.
    11 NOP. No operation. Output remains unchanged. In effect, this setting turns drawing off.
    12 Merge Not Pen. Combination of the BackColor and the inverse of the ForeColor.
    13 (Default). Copy Pen. Color specified by the ForeColor property.
    14 Merge Pen Not. Combination of the ForeColor and the inverse of the BackColor.
    15 Merge Pen. Combination of the ForeColor and the BackColor.
    16 Whiteness Pen. Shape is drawn white.

Remarks

Use the DrawMode property to produce visual effects with Shape or Line controls or when drawing with graphics methods. As a new shape is drawn, Visual FoxPro compares each pixel in the pattern with the corresponding pixel in the existing background and then applies bitwise operations. For example, setting 7 uses the exclusive OR operator (XOR) to combine a drawing pattern pixel with the background pixel.

The exact effect of the DrawMode property setting depends on how the color of a line drawn at run time combines with colors already on the screen. Settings 1, 6, 7, 11, 13, and 16 yield the most predictable results.

See Also

Box Method | Circle Method | DrawWidth Property | DrawStyle Property | FillColor Property | FillStyle Property | Line Method | Pset Method

Applies To: Form | Line | _SCREEN | Shape