Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.Graphics.dispose()


      // Draws the image on the original graphics
      graphics.drawImage(image, 0, 0);

      // Disposes image (and GC btw) and SWT graphics
      image.dispose();
      swtGraphics.dispose();
    }
  }
}
View Full Code Here


      gc.setTextAntialias(SWT.OFF);
    }
   
    Graphics graphics = new SWTGraphics(gc);
    rootFigure.paint(graphics);
    graphics.dispose();

    ImageLoader loader = new ImageLoader();
    loader.data = new ImageData[]{image.getImageData()};

    ByteArrayOutputStream os = new ByteArrayOutputStream();
View Full Code Here

      gc.setTextAntialias(SWT.OFF);
    }
   
    Graphics graphics = new SWTGraphics(gc);
    rootFigure.paint(graphics);
    graphics.dispose();

    ImageLoader loader = new ImageLoader();
    loader.data = new ImageData[]{image.getImageData()};

    ByteArrayOutputStream os = new ByteArrayOutputStream();
View Full Code Here

      Graphics g = new SWTGraphics(imageGC);
      fig4.paint(g);
      fig3.paint(g);
      fig2.paint(g);
      fig1.paint(g);
      g.dispose();
      exportImageJob(img, imageGC, saveLocation,
          fileDialog.getFilterIndex());
    }
  }
View Full Code Here

        img = new Image(Display.getCurrent(), data);
        imageGC = new GC(img);
        Graphics g = new SWTGraphics(imageGC);
        monitor.worked(3);
        fig1.paint(g);
        g.dispose();
        imageGC.dispose();
        img.dispose();
        monitor.done();
        return Status.OK_STATUS;
      }
View Full Code Here

    ImageData data = image.getImageData();
    ImageDescriptor id = ImageDescriptor.createFromImageData(data);

    // Disposes image (and GC btw) and SWT graphics
    image.dispose();
    graphics.dispose();

    return id;
  }

  /**
 
View Full Code Here

      imageLoader.data = new ImageData[] { image.getImageData() };
      imageLoader.save(result, format);
    }
    finally {
      if (g != null) {
        g.dispose();
      }
      if (gc != null) {
        gc.dispose();
      }
      if (image != null) {
View Full Code Here

      imageLoader.data = new ImageData[] { image.getImageData() };
      imageLoader.save(result, format);
    }
    finally {
      if (g != null) {
        g.dispose();
      }
      if (gc != null) {
        gc.dispose();
      }
      if (image != null) {
View Full Code Here

      imageLoader.data = new ImageData[] { image.getImageData() };
      imageLoader.save(result, format);
    }
    finally {
      if (g != null) {
        g.dispose();
      }
      if (gc != null) {
        gc.dispose();
      }
      if (image != null) {
View Full Code Here

      imageLoader.data = new ImageData[] { image.getImageData() };
      imageLoader.save(result, format);
    }
    finally {
      if (g != null) {
        g.dispose();
      }
      if (gc != null) {
        gc.dispose();
      }
      if (image != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.