org.apache.pdfbox.contentstream.operator.color

## Class SetColor

- java.lang.Object
- - org.apache.pdfbox.contentstream.operator.OperatorProcessor
  - - org.apache.pdfbox.contentstream.operator.color.SetColor

Direct Known Subclasses:
  SetNonStrokingColor, SetStrokingColor

    public abstract class SetColor
    extends OperatorProcessor

sc,scn,SC,SCN: Sets the color to use for stroking or non-stroking operations.

Author:
  John Hewson

### Constructor Summary

Constructors
`protected` `SetColor(PDFStreamEngine context)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected abstract PDColor` `getColor()` Returns either the stroking or non-stroking color value.
`protected abstract PDColorSpace` `getColorSpace()` Returns either the stroking or non-stroking color space.
`void` `process(Operator operator, List<COSBase> arguments)` Process the operator.
`protected abstract void` `setColor(PDColor color)` Sets either the stroking or non-stroking color value.

### Methods inherited from class org.apache.pdfbox.contentstream.operator.OperatorProcessor

`checkArrayTypesClass, getContext, getName`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SetColor

    protected SetColor(PDFStreamEngine context)

### Method Detail

#### process

    public void process(Operator operator,
                        List<COSBase> arguments)
                 throws IOException

Description copied from class: `OperatorProcessor`
Process the operator.

Specified by:
  `process` in class `OperatorProcessor`
Parameters:
  `operator` - the operator to process
  `arguments` - the operands to use when processing
Throws:
  `IOException` - if the operator cannot be processed

#### getColor

    protected abstract PDColor getColor()

Returns either the stroking or non-stroking color value.

Returns:
  The stroking or non-stroking color value.

#### setColor

    protected abstract void setColor(PDColor color)

Sets either the stroking or non-stroking color value.

Parameters:
  `color` - The stroking or non-stroking color value.

#### getColorSpace

    protected abstract PDColorSpace getColorSpace()

Returns either the stroking or non-stroking color space.

Returns:
  The stroking or non-stroking color space.