code: public int getLength(TermLengthOrPercent value, boolean auto, TermLengthOrPercent defval, TermLengthOrPercent autoval, int whole)
      {
          TermLengthOrPercent val = value;
          if (value == null) val = defval;
          if (auto) val = autoval;
          if (val != null)
              return (int) context.pxLength(val, whole);
          else
          	return 0;
      }
docs: Returns the length in pixels from a CSS definition. <code>null</code> values
  of the lengths are interpreted as zero.
  @param value The length or percentage value to be converted
  @param auto True, if the property is set to <code>auto</code>
  @param defval The length value to be used when the first one is null
  @param autoval The value to be used when "auto" is specified
  @param whole the length to be returned as 100% (in case of percentage values)