Compartir a través de


DrawingAttributes.RasterOperation Property

DrawingAttributes.RasterOperation Property

Gets or sets a value that defines how the colors of the pen and background interact.

Definition

Visual Basic .NET Public Property RasterOperation As RasterOperation
C# public RasterOperation RasterOperation { get; set; }
Managed C++ public: __property RasterOperation* get_RasterOperation();
public: __property void set_RasterOperation(RasterOperation*);

Property Value

Microsoft.Ink.RasterOperation. The value that defines how the colors of the pen and background interact.

This property is read/write. This property has no default value.

Black1 Specifies black pen color.
NotMergePen2 Specifies the inverse of MergePen.
MaskNotPen3 Specifies a combination of the colors are common to the background color and the inverse of the pen.
NotCopyPen4 Specifies the inverse of CopyPen.
MakePenNot5 Specifies a combination of the colors are common to both the pen and the inverse of the display.
Not6 Specifies the inverse of the display color.
XOrPen7 Specifies a combination of the colors in the pen and in the display color, but not in both.
NotMaskPen8 Specifies the inverse of MaskPen.
MaskPen9 Specifies a combination of the colors common to both the pen and the display.
NotXOrPen10 Specifies an inverse of XOrPen.
NoOperation11 Specifies no operation; the output remains unchanged.
MergeNotPen12 Specifies a combination of the display color and the inverse of the pen color.
CopyPen13 Specifies the pen color.
MergePenNot14 Specifies a combination of the pen color and the inverse of the display color.
MergePen15 Specifies a combination of the pen color and the display color.
White16 Specifies a white pen color.

Remarks

The RasterOperation enumeration defines values for performing raster operations on drawn ink. For example, if you want to perform subtractive transparency, set the raster value to MaskPen.

For a complete list of available raster operations, see the RasterOperation enumeration type.

Note: Many printers do not support many of the available raster operations. Because of this, the colors displayed may be different than the colors printed. This is directly related to the printer drivers or printer hardware. You may have to experiment to determine which printers can produce the correct output when various raster operations are set on ink.

When the RasterOperation value is set to anything other than CopyPen, all drawing attributes—anti-aliasing, smoothing, transparency, and pressure—are ignored.

Examples

[C#]

This C# example sets the raster operation of the InkCollector object's default pen to XOrPen.

theInkCollector.DefaultDrawingAttributes.RasterOperation =
    RasterOperation.XOrPen;
                

[VB.NET]

This Microsoft® Visual Basic® .NET example sets the raster operation of the InkCollector object's default pen to XOrPen.

theInkCollector.DefaultDrawingAttributes.RasterOperation = _
    RasterOperation.XOrPen
                

See Also