1 17 18 19 20 package org.apache.fop.fo.expr; 21 22 import org.apache.fop.apps.FOUserAgent; 23 import org.apache.fop.fo.properties.ColorProperty; 24 import org.apache.fop.fo.properties.Property; 25 26 29 class SystemColorFunction extends FunctionBase { 30 31 32 public int nbArgs() { 33 return 1; 34 } 35 36 37 public Property eval(Property[] args, 38 PropertyInfo pInfo) throws PropertyException { 39 FOUserAgent ua = (pInfo == null) 40 ? null 41 : (pInfo.getFO() == null ? null : pInfo.getFO().getUserAgent()); 42 return new ColorProperty(ua, "system-color(" + args[0] + ")"); 43 44 } 45 46 } 47 | Popular Tags |