[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [udig-devel] 3/2 How to render onto an Image using a Map | 
The PDF export (i.e. to jpeg) gets the colours all wrong.  The 
background seems to be a weird pink colour.  If I use 
BufferedImage.TYPE_INT_RGB then the colours are mostly right, except 
the background is black instead of white.  My attempts to use
map.getBlackboard().put(ProjectBlackboardConstants.MAP__BACKGROUND_COLOR, 
Color.WHITE);
have had no effect on that.
regards,
Vince.
At 17:17 24/10/2007, Jody Garnett wrote:
Vince Darley wrote:
3) I have a map with a bunch of layers shown.  I'd like to get a 
renderer (using RenderManager?) which I can use to render an 
arbitrary bounding box of those layers (not necessarily related to 
the bounding box of the current view port of the map) to a 
BufferedImage of arbitrary size which I can then use for other 
purposes.  Can you fill me in on the basic way to achieve this?
Have a look at the PNG export; or PDF export community modules in 
Jesse's section of svn. Also the map print functionality does this 
sort of work in order to render the Map onto an image for the "Box" 
you can layout on the page.  Map is "just" a data structure so you 
will find some of these examples going about the rendering process 
with different assumptions (say speed vs. quality).