Class TXTState
java.lang.Object
org.apache.fop.render.txt.TXTState
This keeps information about the current state when writing to txt, i.e.
manages coordinate transformation matrices for getting absolute coordinates.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CTMCurrent result coordinate transformation matrix.private LinkedListKeeps all coordinate transformation matrices during rendering. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidRecalculate current result coordinate transformation matrix.voidpop()Pop the coordinate transformation matrix from the stack and reevaluateresultCTM.voidPush the current coordinate transformation matrix onto the stack and reevaluateresultCTM.Modifies coordinate transformation matrix in such a way, so x-shift and y-shift will be transformed in text positions.transformPoint(int x, int y) Transforms point (x, y) usingresultCTM.transformPoint(Point p, CTM ctm) Transformspointusingctm.private voidupdateResultCTM(CTM ctm) Updates result coordinate transformation matrix (i.e.
-
Field Details
-
stackCTM
Keeps all coordinate transformation matrices during rendering. -
resultCTM
Current result coordinate transformation matrix. It's product of all matrices in order, saved instackCTM.
-
-
Constructor Details
-
TXTState
public TXTState()Constructs a newly allocatedTXTStateobject.
-
-
Method Details
-
updateResultCTM
Updates result coordinate transformation matrix (i.e.resultCTM), multipliing it by given matrix.- Parameters:
ctm- CTM
-
calcResultCTM
private void calcResultCTM()Recalculate current result coordinate transformation matrix. -
push
Push the current coordinate transformation matrix onto the stack and reevaluateresultCTM.- Parameters:
ctm- instance of CTM
-
pop
public void pop()Pop the coordinate transformation matrix from the stack and reevaluateresultCTM. -
refineCTM
-
transformPoint
-
transformPoint
Transforms point (x, y) usingresultCTM.- Parameters:
x- x-coordinatey- y-coordinate- Returns:
- transformed Point
-
getResultCTM
- Returns:
- current result coordinate transformation matrix
-