private static class OutputElement.OutputInstruction extends InstructionWithContent
Modifier and Type | Field and Description |
---|---|
private int |
cropOffX |
private int |
cropOffY |
private boolean |
flipY |
private int |
origHeight |
private float |
xBias |
private float |
xScale |
private float |
yBias |
private float |
yScale |
attribs, content, name
Constructor and Description |
---|
OutputInstruction(HashMap<String,Expression> attribs,
boolean flipY,
Expression content) |
Modifier and Type | Method and Description |
---|---|
private float |
getFloatAttrib(XPathContext context,
String attName,
float defaultVal)
Get an attribute value and convert to floating point.
|
private void |
makeBackgroundYellow(BufferedImage bi,
OutputElement.Rect rect)
Change white background to yellow in the given area of an image
|
private void |
makeForegroundRed(BufferedImage bi,
OutputElement.Rect rect)
Change black foreground to red in the given area of an image
|
private OutputElement.Rect |
parseRect(XPathContext context,
NodeInfo node,
int imgWidth,
int imgHeight)
Parse the "left", "top", "right", and "bottom" attributes from a
"highlight" element.
|
TailCall |
processLeavingTail(XPathContext context)
This is where the main work should be performed.
|
createsNewNodes, display, dynamicError, getAttribBool, getAttribStr, getAttribStr, getCardinality, getInstructionNameCode, getItemType, iterateSubExpressions, optimize, promoteInst, replaceSubExpression, sequenceToString, simplify, typeCheck
appendItem, assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, dynamicError, evaluateAsString, evaluateItem, getImplementationMethod, getInstructionInfo, getSourceLocator, isXSLT, iterate, process, promote
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, getColumnNumber, getConstructType, getContainingProcedure, getDependencies, getExecutable, getHostLanguage, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, markTailFunctionCalls, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, suppressValidation, typeError
private boolean flipY
private float xBias
private float xScale
private float yBias
private float yScale
private int origHeight
private int cropOffX
private int cropOffY
public OutputInstruction(HashMap<String,Expression> attribs, boolean flipY, Expression content)
public TailCall processLeavingTail(XPathContext context) throws XPathException
InstructionWithContent
processLeavingTail
in interface TailCallReturner
processLeavingTail
in class InstructionWithContent
XPathException
private float getFloatAttrib(XPathContext context, String attName, float defaultVal) throws XPathException
XPathException
private OutputElement.Rect parseRect(XPathContext context, NodeInfo node, int imgWidth, int imgHeight) throws DynamicError
node
- The element containing the attributesimgHeight
- The height to use when flippingDynamicError
private void makeBackgroundYellow(BufferedImage bi, OutputElement.Rect rect)
private void makeForegroundRed(BufferedImage bi, OutputElement.Rect rect)