Re: Page Overlay (IPO) Extension

2009-10-02 Thread Venkat Reddy

Hi Jeremias,

Thanks for your help. I have done few changes to the 
AFPPageSetupElement.java, and the offset coordinates are working infact. 
I just want to know more on your other point mentioned in your reply 
'offset coordinates user-friendly'...


There is some code I have found in

   *org.apache.fop.afp.AFPUnitConverter*

, namely the method

   *public int[] mpts2units(float[] srcPts)*

Is this the same method you are suggesting me to use to map the 
user-friendly offset coordinates to get converted into float values?


Thanks,
Venkat.

Jeremias Maerki wrote:

Venkat,

first of all you probably need to subclass AFPPageSetupElement to add
support for carrying the offset coordinates. AFPElementMapping would
then also need to be changed. Then you'd need to move on to
AFPDocumentHandler.handleExtensionObject where the extension is
converted into calls into the AFP library.
DataStream.createIncludePageOverlay would then also need to be extended.
And so on and on...

I guess one challenge is to make the specification of the offset
user-friendly. I don't think it's acceptable to expect from the user to
know what numeric value would need to be specified to get the right
placing. Maybe you can reuse something from the FO property subsystem to
parse arbitrary lengths, internally work with millipoints and then
convert that to the final value.

On 01.10.2009 16:52:23 Venkat Reddy wrote:
  

Hi,

I want to include X and Y coordinates to the afp:include-page-overlay 
definition, something like below


  afp:include-page-overlay id=IPO001 name=O1tcgas1 *x=300 
y=500*/


in PageObject.java, the following method will be used when there is an 
overlay referenced in a FO document.
public void *createIncludePageOverlay*(String name, *int x, int y*, 
int orientation)


where the X and Y coordinates hardcoded as '0' in *DataStream.java*. I 
want to pass these values through the above page overlay definition, Can 
someone tell me, how do I pass these coordinates?


Thanks,
Venkat.






Jeremias Maerki


  




Page Overlay (IPO) Extension

2009-10-01 Thread Venkat Reddy

Hi,

I want to include X and Y coordinates to the afp:include-page-overlay 
definition, something like below


 afp:include-page-overlay id=IPO001 name=O1tcgas1 *x=300 
y=500*/


in PageObject.java, the following method will be used when there is an 
overlay referenced in a FO document.
   public void *createIncludePageOverlay*(String name, *int x, int y*, 
int orientation)


where the X and Y coordinates hardcoded as '0' in *DataStream.java*. I 
want to pass these values through the above page overlay definition, Can 
someone tell me, how do I pass these coordinates?


Thanks,
Venkat.


Re: Page Overlay (IPO) Extension

2009-10-01 Thread Jeremias Maerki
Venkat,

first of all you probably need to subclass AFPPageSetupElement to add
support for carrying the offset coordinates. AFPElementMapping would
then also need to be changed. Then you'd need to move on to
AFPDocumentHandler.handleExtensionObject where the extension is
converted into calls into the AFP library.
DataStream.createIncludePageOverlay would then also need to be extended.
And so on and on...

I guess one challenge is to make the specification of the offset
user-friendly. I don't think it's acceptable to expect from the user to
know what numeric value would need to be specified to get the right
placing. Maybe you can reuse something from the FO property subsystem to
parse arbitrary lengths, internally work with millipoints and then
convert that to the final value.

On 01.10.2009 16:52:23 Venkat Reddy wrote:
 Hi,
 
 I want to include X and Y coordinates to the afp:include-page-overlay 
 definition, something like below
 
   afp:include-page-overlay id=IPO001 name=O1tcgas1 *x=300 
 y=500*/
 
 in PageObject.java, the following method will be used when there is an 
 overlay referenced in a FO document.
 public void *createIncludePageOverlay*(String name, *int x, int y*, 
 int orientation)
 
 where the X and Y coordinates hardcoded as '0' in *DataStream.java*. I 
 want to pass these values through the above page overlay definition, Can 
 someone tell me, how do I pass these coordinates?
 
 Thanks,
 Venkat.




Jeremias Maerki