org.apache.fop.render.txt

## Class TXTState

- java.lang.Object
- - org.apache.fop.render.txt.TXTState

-     public class TXTState
      extends java.lang.Object

  This keeps information about the current state when writing to txt, i.e. manages coordinate transformation matrices for getting absolute coordinates.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TXTState()` Constructs a newly allocated `TXTState` object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CTM` | `getResultCTM()`
    `void` | `pop()` Pop the coordinate transformation matrix from the stack and reevaluate `resultCTM`.
    `void` | `push(CTM ctm)` Push the current coordinate transformation matrix onto the stack and reevaluate `resultCTM`.
    `CTM` | `refineCTM(CTM ctm)` Modifies coordinate transformation matrix in such a way, so x-shift and y-shift will be transformed in text positions.
    `java.awt.Point` | `transformPoint(int x, int y)` Transforms point (x, y) using `resultCTM`.
    `java.awt.Point` | `transformPoint(java.awt.Point p, CTM ctm)` Transforms `point` using `ctm`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TXTState

          public TXTState()

      Constructs a newly allocated `TXTState` object.

  - ### Method Detail

    - #### push

          public void push(CTM ctm)

      Push the current coordinate transformation matrix onto the stack and reevaluate `resultCTM`.
      Parameters:
        `ctm` - instance of CTM

    - #### pop

          public void pop()

      Pop the coordinate transformation matrix from the stack and reevaluate `resultCTM`.

    - #### refineCTM

          public CTM refineCTM(CTM ctm)

      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

          public java.awt.Point transformPoint(java.awt.Point p,
                                      CTM ctm)

      Transforms `point` using `ctm`.
      Parameters:
        `p` - Point
        `ctm` - CTM
      Returns:
        transformed Point

    - #### transformPoint

          public java.awt.Point transformPoint(int x,
                                      int y)

      Transforms point (x, y) using `resultCTM`.
      Parameters:
        `x` - x-coordinate
        `y` - y-coordinate
      Returns:
        transformed Point

    - #### getResultCTM

          public CTM getResultCTM()

      Returns:
        current result coordinate transformation matrix

Copyright 1999-2019 The Apache Software Foundation. All Rights Reserved.