Class PSTLengthParameter

  • All Implemented Interfaces:
    ExpressionConstants, PicObjectConstants

    public class PSTLengthParameter
    extends SequenceExpression
    implements PicObjectConstants
    Parses statement involving length units (as set by PsTricks's "runit" register), e.g. "linewidth=13mm" or "doublesep=5.6" (default to current "runit")

    Numerical parsed value is pushed in the Pool's PicAttributeSet having the given key, (after conversion to mm)

    This expression contains a StatementExpression with parameters "DOUBLE" and "POSITIVE". So far, this expression parses "cm", "mm" and "pt".

    This expression MUST NOT be used to parse expressions that modify one of "xunit", "yunit" or "runit", since it relies on the value of these registers to compute the actual length value in case no unit is present !!!

    Version:
    $Id: PSTLengthParameter.java,v 1.4.2.1 2007/09/02 11:56:12 reynal Exp $
    Author:
    Sylvain Reynal
    • Constructor Detail

      • PSTLengthParameter

        public PSTLengthParameter​(Pool pl,
                                  java.lang.String tag,
                                  PicAttributeName attributeName,
                                  Pool.Key attributeSetKey)
        Parameters:
        pl - parser's pool
        tag - LHS tag (e.g. "linewidth" or "doublesep") for the StatementExpression
        attribute - name of attribute to modify (must be a predefined PicAttributeName of type "Double" or at least "Number")
        attributeSetKey - used to fetch the attribute set in which parsed parameters are stored.