You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Pierre Héroux <pi...@gmail.com> on 2007/02/23 11:37:45 UTC

Fop 0.25 -> Fop 0.93

I was using Fop 0.25 as the basis for an application in which I wrote
a new Renderer for a specific output format.
This renderer (extends AbstractRenderer) needed to compute the
absolute position and position in an x/y coordinate system for every
area (Block, LineArea, WordArea...)
It used the following fields and method (currentXPosition,
currentYPosition, getHeight(), getContentWidth()...)

I now try make my application compliant with fop 0.93. So I have to
rewrite my renderer but many of this information is not available any
more.

I tried to rebuild the needed information by using getIPD() and
getBPD(), but i did not succeed. For example the renderWord(WordArea
word) method
getIPD() and getBPD() return 0.

Any hints for having the absolute position and dimension for every Area ?

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Fop 0.25 -> Fop 0.93

Posted by Manuel Mall <mm...@arcus.com.au>.
On Friday 23 February 2007 19:37, Pierre Héroux wrote:
> I was using Fop 0.25 as the basis for an application in which I wrote
> a new Renderer for a specific output format.
> This renderer (extends AbstractRenderer) needed to compute the
> absolute position and position in an x/y coordinate system for every
> area (Block, LineArea, WordArea...)
> It used the following fields and method (currentXPosition,
> currentYPosition, getHeight(), getContentWidth()...)
>
> I now try make my application compliant with fop 0.93. So I have to
> rewrite my renderer but many of this information is not available any
> more.
>
> I tried to rebuild the needed information by using getIPD() and
> getBPD(), but i did not succeed. For example the renderWord(WordArea
> word) method
> getIPD() and getBPD() return 0.
>
> Any hints for having the absolute position and dimension for every
> Area ?

You have to keep track of the absolute position within your renderer.

Have a look at an existing renderer, for example the AFP renderer 
(org.apache.fop.render.afp.AFPRenderer) which needs a lot of absolute 
positioning internally, and see how the currentIPPosition / 
currentBPPosition variables are maintained.

Manuel

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org