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 Details

    • SetColor

      public SetColor()
  • Method Details

    • 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.