Hi Brian >I took a look at the diffs and had an idea. Since TextPosition now >returns coordinates and such that are adjusted for various rotations >and changes in the 0,0 location, perhaps the new getTextPos() method >should also adjust the matrix for the 0,0 location. Then none of the >callers need to deal with converting the values (since they no longer >need to deal with the conversions when getting the X and Y >coordinates either). Or, the TextPosition could create and return an >AffineTransform object. I had a similar idea. My first attempt looked like this:
- I've added a method to the class TextPosition to get the AffineTransform - I've used the getX/getY-methods to get the starting-coords But then I realized, that I can't get the unmodified starting-coords from TextPosition. They are always altered in some way concerning the rotation. So finally I had to decide if I add 3 new methods (1 for the AffineTransform and 2 for X and Y) to the class TextPosition or if I just get the textPos and put the logic into PageDrawer.showCharacter(). I've choosen alternativ 2. At this point I've a questions concerning your changes to the class TextPosition: There is a pair of methods getX and getXDirAdj (there are similar pairs for Y and Width). Both are returning the same value. Was that your intention? If not, I would suggest to change them. For example getX/Y/Width returns the unmodified values and getX/Y/WidthDirAdj returns the modified values. Consequently I would alter my patch to put some of the logic from PageDrawer to TextPosition. Andreas ---------------------------------------------------------------- - Geschaeftsfuehrung: Chittur Ramakrishnan (Vorsitzender), Stefan Niehusmann - - Sitz der Gesellschaft: Dortmund - - Eingetragen beim Amtsgericht Dortmund - - Handelsregister-Nr. HR B 21222 - - USt.-IdNr. DE 2588 96 719 -
