[udig-devel] Template interface changes on trunk
Jody Garnett
jgarnett at refractions.net
Wed May 7 15:27:12 PDT 2008
Hi Brock; doing a bit of a code review as I go over the Template changes
on trunk ...
One of the methods added - getMapBounds() - returns a Rectangle
capturing the location of the Map in page coordinates.
I think I have been able to write a single implementation of
getMapBounds() as part of AbstractTemplate ....
> public Rectangle getMapBounds() throws IllegalStateException {
> Rectangle bounds = null;
> for( Box box : boxes ){
> if( box.getBoxPrinter() instanceof MapBoxPrinter ){
> Dimension size = box.getSize();
> Point location = box.getLocation();
> bounds = new
> Rectangle(location.x,location.y,size.width,size.height);
> }
> }
> return bounds;
> }
Does this method meet your needs? So far the only code that uses this
method is ExprotPDFWizard.makePage( ... ) where it is used to create a
BufferedImage to render the raster layers onto.
Jody
More information about the udig-devel
mailing list