Package org.apache.fop.render.txt
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpop()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.
-
Constructor Details
-
TXTState
public TXTState()Constructs a newly allocatedTXTStateobject.
-
-
Method Details
-
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
Modifies coordinate transformation matrix in such a way, so x-shift and y-shift will be transformed in text positions.- Parameters:
ctm- CTM to modify- Returns:
- instance of CTM
-
transformPoint
Transformspointusingctm.- Parameters:
p- Pointctm- CTM- Returns:
- transformed Point
-
transformPoint
Transforms point (x, y) usingresultCTM.- Parameters:
x- x-coordinatey- y-coordinate- Returns:
- transformed Point
-
getResultCTM
- Returns:
- current result coordinate transformation matrix
-