Hi,
AFPPaintingState is being used in three different places altogether in
FopTrunk source. The default constructor is being used in the following
three classes...
1. AFPDocumentHandler.java
2. AFPRenderer.java
3. AFPPageOverlayElement.java
There is a variable 'resolution' is being initialized for each instance,
this resolution parameter can be set using the 'fop.xconf' for a
particular render...
Ex:- AFPRenderer configuration below
<renderer mime="application/x-afp">
<!--
The bit depth and type of images produced
(this is the default setting)
-->
<images mode="b+w" bits-per-pixel="8"/>
<renderer-resolution>1400</renderer-resolution>
The above <renderer-resolution> is being hardcoded as '240dpi' in
AFPRendererConfigurator.java, which initiates the renderer resolution
based on the configuration set in 'fop.xconf'. In order to resolve this
problem, I will be changing the AFPPaintingState as singleton, so that
all the above classes will get the instance using 'getInstance()' method
instead of default constructor. This will resolve the
<renderer-resolution> problem as well, by a simple change in
AFPRendererConfigurator (instead of hardcoded value 240, assigning the
value from the configuration object).
Please review the above changes and tell me, if I am doing anything
wrong here?
Thanks,
Venkat.