Compartilhar via


RasterOperation Property

RasterOperation Property

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

Declaration

[C++]

[C++]

[propput] HRESULT put_RasterOperation (
    [in] InkRasterOperation RasterOperation
);
[propget] HRESULT get_RasterOperation (
    [out, retval] InkRasterOperation* RasterOperation
);

      

[Microsoft® Visual Basic® 6.0]

[Visual Basic]

Public Property Get RasterOperation() As InkRasterOperation
Public Property Let RasterOperation( _
    ByVal theRasterOperation As InkRasterOperation)

      

Property Value

InkRasterOperation A value that defines how the colors of the pen and background interact. The default value is InkRasterOperation.IRO_CopyPen, which indicates that the current pen color is used.

This property is read/write.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER Parameter pointer was NULL or invalid.
E_INK_EXCEPTION An exception occurred inside the method.

Remarks

The InkRasterOperation 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 InkRasterOperation 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 property is set to anything other than InkRasterOperation.IRO_CopyPen, all drawing attributes—anti-aliasing, smoothing, transparency, and pressure—are ignored.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example sets the raster operation of the InkCollector object's default pen to InkRasterOperation.IRO_XOrPen.

[Visual Basic]

theInkCollector.DefaultDrawingAttributes.RasterOperation = IRO_XOrPen

      

Applies To