This is mainly for Jeremias: While working with the AFP Renderer I had some struggles with the FOP renderer interfaces (which I haven't changed so far).
The problems are largely related to Viewport positioning. Firstly the area tree does not carry enough direct information. There are no reference-orientation, writing-mode, block-progression-direction, inline-progression-direction traits for example. Secondly all positioning seems to be expected to be done via the Coordinate Transformation Matrix (which is carried in the area tree). But the CTM approach does not fit well into AFP. AFP wants actual rotation info (0, 90, 180, 270), i.e. it allows to set the coordinate system origin to one of the 4 corners of the page box (with the corresponding implicit change of i-p-direction and b-p-direction). So, when in AFP I have to render a Block/Region Viewport I need to set the origin to the appropriate corner of the page depending on the reference-orientation of the Viewport and then have to use offsets from that corner to where the Viewport sits on the page. These offsets can be easily calculated from the Viewport content rectangle for a given orientation. You recently introduced the startVP and endVP functions into the renderers but their parameters are CTM and Clip. I need reference orientation and Viewport content rectangle. What I ended up doing was to make copies of the renderBlockViewport and renderRegionViewport functions into the AFP Renderer which call my own versions of startVP / endVP which have a different signature. I was also forced to reverse engineer the value of reference-orientation from the factors stored in the CTM (yuk). I think this needs improvement but what is the best strategy here? Manuel