public static RenderContext configureMapForRendering(Map map, final Dimension destinationSize, final int dpi, BoundsStrategy boundsStrategy, ReferencedEnvelope baseMapBounds) {
RenderManager manager = RenderFactory.eINSTANCE.createRenderManagerViewer();
map.setRenderManagerInternal(manager);
RenderContext tools = new RenderContextImpl();
tools.setMapInternal(map);
tools.setRenderManagerInternal(manager);
ProjectUIPlugin
.trace(
ApplicationGIS.class,
"Firing size changed event. Changing to size: " + destinationSize.width + " by " + destinationSize.height, null); //$NON-NLS-1$ //$NON-NLS-2$