다음을 통해 공유


DrawingAttributes.RasterOperation Property

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

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Property RasterOperation As RasterOperation
'Usage
Dim instance As DrawingAttributes
Dim value As RasterOperation

value = instance.RasterOperation

instance.RasterOperation = value
public RasterOperation RasterOperation { get; set; }
public:
property RasterOperation RasterOperation {
    RasterOperation get ();
    void set (RasterOperation value);
}
/** @property */
public RasterOperation get_RasterOperation ()

/** @property */
public void set_RasterOperation (RasterOperation value)
public function get RasterOperation () : RasterOperation

public function set RasterOperation (value : RasterOperation)
Not applicable.

Property Value

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

Value

Meaning

CopyPen

The current pen color is used.

RasterOperation value

A member of the RasterOperation enumeration type defines how the colors of the pen and background interact.

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.

Example

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

theInkCollector.DefaultDrawingAttributes.RasterOperation =
    RasterOperation.XOrPen;

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

theInkCollector.DefaultDrawingAttributes.RasterOperation = _
    RasterOperation.XOrPen

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

DrawingAttributes Class
DrawingAttributes Members
Microsoft.Ink Namespace
RasterOperation