Ok fair enough. I have added a method to the IRenderManager for 1.1 so that you can ask for the most recently rendered image. However, for 1.0.x there is no method so you will have to follow this hack: (It will work for 1.1 as well so don't worry about that).

RenderManager manager=(RenderManager)map.getRenderManager;
RenderedImage image=manager.getRenderExecutor().getContext().getImage();

Jesse

Iñigo Telleria Elola wrote:

Hi,
I want to the develop a simple plugin: when I click on a plugin's button a new windows appears with the image I have opened on Udig. I have obtained open a window with this code (I have to improve it because it isn't efficient):
  Display display = new Display();
  Shell shell = new Shell(display);
  shell.setText("Demo");
  shell.setBounds(100, 100, 200, 100);
  shell.setLayout(new FillLayout());
  shell.open();
  while (!shell.isDisposed()) {
   if (!display.readAndDispatch()) display.sleep();
   }
  display.dispose();
But now I don't know how to obtain the image from uDig to the new window and open this image in the new window. Thanks

------------------------------------------------------------------------

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to