Skip to content

# PDFSetShadingOperator

Namespace: O2S.Components.PDF4NET.Graphics.Operators

Defines the sh (set shading) content stream operator.

    public class PDFSetShadingOperator : PDFContentStreamOperator

Inheritance Object → PDFContentStreamOperator → PDFSetShadingOperator

## Constructors

### PDFSetShadingOperator()

Initializes a new PDFSetShadingOperator object.

    public PDFSetShadingOperator()

### PDFSetShadingOperator(PDFCosName)

Initializes a new PDFSetShadingOperator object.

    public PDFSetShadingOperator(PDFCosName shadingID)

Parameters

`shadingID` PDFCosName
The shading ID in the /Resources dictionary.

## Properties

### Context

Gets the content stream container from which the operator is extracted.

    public PDFContentStreamContainer Context { get; internal set; }

Property Value

PDFContentStreamContainer
A content stream container object, a PDFPage or a PDFFormXObject.

### OpCode

Gets the operator code.

    public string OpCode { get; }

Property Value

String
The operator code as it is written in the content stream.

### Shading

Gets the shading object associated with this operator.

    public PDFShading Shading { get; }

Property Value

PDFShading
A PDFShading object that describes the shading painted by this operator.

### ShadingID

Gets or sets the shading ID.

    public PDFCosName ShadingID { get; set; }

Property Value

PDFCosName
The shading ID in the /Resources dictionary.

### Type

Gets or sets the operator type.

    public PDFContentStreamOperatorType Type { get; set; }

Property Value

PDFContentStreamOperatorType
The type of this operator.