|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectExpression
Instruction
InstructionWithContent
OutputElement.OutputInstruction
private static class OutputElement.OutputInstruction
Field Summary | |
---|---|
private int |
cropOffX
|
private int |
cropOffY
|
private boolean |
flipY
|
private int |
origHeight
|
private float |
xBias
|
private float |
xScale
|
private float |
yBias
|
private float |
yScale
|
Fields inherited from class InstructionWithContent |
---|
attribs, content, name |
Fields inherited from class Expression |
---|
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticProperties |
Constructor Summary | |
---|---|
OutputElement.OutputInstruction(HashMap<String,Expression> attribs,
boolean flipY,
Expression content)
|
Method Summary | |
---|---|
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. |
Methods inherited from class InstructionWithContent |
---|
createsNewNodes, display, dynamicError, getAttribBool, getAttribStr, getAttribStr, getCardinality, getInstructionNameCode, getItemType, iterateSubExpressions, optimize, promoteInst, replaceSubExpression, sequenceToString, simplify, typeCheck |
Methods inherited from class Instruction |
---|
appendItem, assembleParams, assembleTunnelParams, computeCardinality, computeSpecialProperties, dynamicError, evaluateAsString, evaluateItem, getImplementationMethod, getInstructionInfo, getSourceLocator, isXSLT, iterate, process, promote |
Methods inherited from class Expression |
---|
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 |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface SourceLocator |
---|
getColumnNumber, getLineNumber, getPublicId, getSystemId |
Field Detail |
---|
private boolean flipY
private float xBias
private float xScale
private float yBias
private float yScale
private int origHeight
private int cropOffX
private int cropOffY
Constructor Detail |
---|
public OutputElement.OutputInstruction(HashMap<String,Expression> attribs, boolean flipY, Expression content)
Method Detail |
---|
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 flipping
DynamicError
private void makeBackgroundYellow(BufferedImage bi, OutputElement.Rect rect)
private void makeForegroundRed(BufferedImage bi, OutputElement.Rect rect)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |