[udig-devel] dpi issues
Jody Garnett
jgarnett at refractions.net
Wed Mar 26 08:55:09 PDT 2008
Vince Darley wrote:
> I notice from the mailing list that Jody wrote this in December:
>> As we cranked up the DPI on our PDF export functions the text, and the
>> scalebar started getting smaller and smaller.
>>
>> I have added a couple of methods to ViewportGraphics interface:
>> - getDPI()
>> - setFont( font )
>>
>> The font provided is an AWT Font; with getSize() expressed in "points"
>> (according to the the javadocs that is assumed to be 72 dpi).
> Is this supposed to have fixed the "the text, and the scalebar started
> getting smaller and smaller." problem? I still see that same problem
> when I adjust the dpi. (I'm using ApplicationGIS.drawMap()).
I was not aware of that problem; I was generating a PDF myself - I *did*
preprocess my map and adjust all the Scales and Font sizes in the
GeoTools Style objects (since they are expressed in pixels it needed to
be done).
There is a RescaleStyleVisitor documented here:
-
http://docs.codehaus.org/display/GEOTDOC/08+StyleVisitor+use+with+DuplicatingStyleVisitor+and+RescaleStyleVisitor
I am not sure how "smart" we want ApplicationGIS.drawMap() to be? Making
getDPI available allowed the scalebar and other map graphics to know
what was going on and adjust accordingly, the BasicFeatureRenderer still
made use of the Style as provided (I preprocessed the Style to make it
show what I wanted).
Jody
More information about the udig-devel
mailing list