Victor and Jeremias, thanks for your Inputs. Victor, I've checked out your aXSL. I'll study it and come back to you if I have questions.
Jeremias wrote: > > Speaking of startVParea(), could we rename it to something more meanigfull? > > Proposition: TransformPosition, or something like this. > > Deleted the methods moved to AbstractRenderer. > Actually, I like startVParea() (or rather startViewportArea like I would > rather call it) because only for viewport a new transformation matrix is > necessary. I think when you port the matrix concatenation from the PDF > renderer over to Java2D in startVParea() you will start to understand > what's going on here. OK, thanks. That makes sense. > > fop.area.CTM: added two getters for e and f. If there's another way to get > > those > > values, please let me know. > Normally, we use toArray() but I guess these two getters are ok and > don't hurt although I think they are not necessary because you need to > use all other values in the CTM, too, to get the reference orientation > stuff right. See above. OK, I'll use the available toArray() instead. > > The enclosed image doesn't have ipd/bpd > > either. Again: is this normal so? I have a workaround in mind (getting those > > values through the FopImage), but it doesn't sound right. > In this case it is probably better to fix the LMs. I've started doing > that but haven't finished. ATM this is lower priority for me. I can send > you my current code if you want to try to fix it. Shouldn't be so > difficult. I would also prefer to fix the LM's. I don't want to go into it now (too complex for me ATM), but I'll come back to you later. > > renderTextDecoration(InlineArea) seems to work, even if it's not > > implemented?? > Huh? It was you who moved the implementation up from PDFRenderer to > AbstractRenderer. That's how you implemented it. Inheritance! I mean renderTextDecoration(InlineArea) from AbstractRenderer, which is an empty ATM . Did you mean renderTextDecoration(Font fs, InlineArea Inline, int baseline, int startx) instead? But I think I got in now: when I run examples/fo/basic/textdeko.fo , the underline of the sentence "This is a whole block wrapped in fo:inline with the property text-decoration="underline". Some more Text to get at least two lines." works ok. This is because the TextArea handles the underline (via renderTextDecoration(Font fs, InlineArea Inline, int baseline, int startx) ) and the renderTextDecoration(InlineArea) doesn't do anything. > BTW, Using Graphics.create() you should be able to create a copy of the > current Graphics2D object. By pushing the old one on a stack and > overwriting the graphics member variable should should be able to create > the same effect as with currentState.push()/saveGraphicsState() in > PDFRenderer.startVParea () and currentState.pop()/restoreGraphicsState > ()in endVParea(). When leaving a VP area you can simply restore an older > Graphics2D object for the stack and continue painting. This will undo > any transformations and state change done in the copy used within the VP > area. See second paragraph in javadocs of java.awt.Graphics. Sounds very good. Why haven't I thought of it ? ;) > Another thought: One of my low-priority tasks is to create a little > application that renders a test suite with all of FOP's renderers > creating bitmap images for each generated document and ultimately > creating a little website that lets us compare the output. PDFs and PS > files can be converted to bitmaps using GhostScript. Maybe you might > want to write such a thingy. I won't get to it before I get to updating > the PS renderer to full quality. That would be good. Do you mean something like the "Bitmap production" you documented on FopAndJava2D ? This is what I intend to work on after the basic Java2DRenderer works. Thanks for your valuable comments. I'll work them out carefully and post an improved patch. Regards, Renaud  http://wiki.apache.org/xmlgraphics-fop/FopAndJava2D