de.dante.extex.interpreter.primitives.color.util
Class ColorParser

java.lang.Object
  extended byde.dante.extex.interpreter.primitives.color.util.ColorParser

public final class ColorParser
extends java.lang.Object

This class provides a parser for color specifications. Several color models are supported.

Version:
$Revision: 1.4 $
Author:
Gerd Neugebauer

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Method Summary
static Color parseColor(Context context, TokenSource source, Typesetter typesetter, java.lang.String name)
          Parse a color specification made up of a color constant for one of the supported color models or a control sequence which is bound to color convertible code.
static Color parseColorConstant(Context context, TokenSource source, Typesetter typesetter, java.lang.String name)
          Parse a color specification made up of a color constant for one of the supported color models.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Method Detail

parseColor

public static Color parseColor(Context context,
                               TokenSource source,
                               Typesetter typesetter,
                               java.lang.String name)
                        throws InterpreterException
Parse a color specification made up of a color constant for one of the supported color models or a control sequence which is bound to color convertible code.

Parameters:
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
name - the name of the invoking primitive
Returns:
th color found
Throws:
InterpreterException - in case of an error

parseColorConstant

public static Color parseColorConstant(Context context,
                                       TokenSource source,
                                       Typesetter typesetter,
                                       java.lang.String name)
                                throws InterpreterException
Parse a color specification made up of a color constant for one of the supported color models.

Parameters:
context - the interpreter context
source - the source for new tokens
typesetter - the typesetter
name - the name of the invoking primitive
Returns:
the color found
Throws:
InterpreterException - in case of an error