com.aspose.pdf.operators

Class SetColor



  • public class SetColor
    extends BasicSetColorOperator

    Represents class for sc operator (set color for non-stroknig operations).

    • Constructor Detail

      • SetColor

        public SetColor()

        Initializes operator.

      • SetColor

        public SetColor(int index,
                        com.aspose.pdf.engine.commondata.pagecontent.operators.commands.ICommand command)

        Constructor for operator class.

        Parameters:
        index - Index of operator.
        command - Operator command.
      • SetColor

        public SetColor(double g)

        Set color for stroking operators for DeviceGrey, CalGrey and Indexed color spaces.

        Parameters:
        g - Color value.
      • SetColor

        public SetColor(double r,
                        double g,
                        double b)

        Set color for stroking operator for DeviceRGB, CalRGB, and Lab color spaces

        Parameters:
        r - Red component.
        g - Green component.
        b - Blue component.
      • SetColor

        public SetColor(double c,
                        double m,
                        double y,
                        double k)

        Set color for non-stroking operator for CMYK colro space

        Parameters:
        c - Cyan component.
        m - Magenta component.
        y - Yellow component.
        k - Black component.
      • SetColor

        public SetColor(double[] color)

        Constructor which allows to specify color components.

        Parameters:
        color - Array of color components.
    • Method Detail

      • getColor

        public Color getColor()
        Not supported yet.

        Returns color specified by the operator.

        Specified by:
        getColor in class SetColorOperator
        Returns:
        Operator color.
      • accept

        public void accept(IOperatorSelector visitor)

        Accepts visitor object to process operator.

        Specified by:
        accept in class Operator
        Parameters:
        visitor - Visitor object.
      • toString

        public String toString()

        String represenation.

        Overrides:
        toString in class Operator
        Returns:
        string value