function.setFunctionName(fname); if (terms_stack.peek().unary == -1) //if started with minus, add the minus to the function name function.setFunctionName('-' + function.getFunctionName()); if (t != null) function.setValue(t);
protected boolean prependMinus(Term<?> term) { boolean merged = false; if (term instanceof TermFloatValue) { // includes TermAngle, TermLength, etc. TermFloatValue floatT = (TermFloatValue) term; floatT.setValue(-1 * floatT.getValue()); merged = true; } else if (term instanceof TermIdent) { TermIdent ident = (TermIdent) term; ident.setValue("-" + ident.getValue()); merged = true; } else if (term instanceof TermFunction) { TermFunction func = (TermFunction) term; func.setFunctionName("-" + func.getFunctionName()); merged = true; } return merged; }
if (fnterm instanceof TermFunction) { ((TermFunction) fnterm).setFunctionName('-' + ((TermFunction) fnterm).getFunctionName()); terms_stack.peek().term = fnterm; } else {
function.setFunctionName(extractText(f)); if (((terms_scope)terms_stack.peek()).unary == -1) //if started with minus, add the minus to the function name function.setFunctionName('-' + function.getFunctionName()); if (t != null) function.setValue(t);
function.setFunctionName(extractText(f)); if (terms_stack.peek().unary == -1) //if started with minus, add the minus to the function name function.setFunctionName('-' + function.getFunctionName()); if (t != null) function.setValue(t);
protected NodeData createLineStyle(float x1, float y1, float x2, float y2) { HtmlDivLine line = new HtmlDivLine(x1, y1, x2, y2); String bside = line.getBorderSide(); NodeData ret = CSSFactory.createNodeData(); TermFactory tf = CSSFactory.getTermFactory(); ret.push(createDeclaration("position", tf.createIdent("absolute"))); ret.push(createDeclaration("position", tf.createIdent("absolute"))); ret.push(createDeclaration("left", tf.createLength(line.getLeft(), unit))); ret.push(createDeclaration("top", tf.createLength(line.getTop(), unit))); ret.push(createDeclaration("width", tf.createLength(line.getWidth(), unit))); ret.push(createDeclaration("height", tf.createLength((float) line.getHeight(), unit))); ret.push(createDeclaration(bside + "-width", tf.createLength(line.getLineStrokeWidth(), unit))); ret.push(createDeclaration(bside + "-style", tf.createIdent("solid"))); String color = colorString(getGraphicsState().getStrokingColor()); ret.push(createDeclaration(bside + "-color", tf.createColor(color))); if (line.getAngleDegrees() != 0) { TermFunction rotate = tf.createFunction(); rotate.setFunctionName("rotate").add(tf.createAngle(String.valueOf(line.getAngleDegrees()), Unit.deg, 1)); ret.push(createDeclaration("transform", rotate)); } return ret; }
fn.setFunctionName(name); fn.setValue(args); if (!fn.isValid())