Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.IFigure.paint()


        try {
            image = new Image(Display.getDefault(), r.width, r.height);
            gc = new GC(image);
            g = new SWTGraphics(gc);
            g.translate(r.x * -1, r.y * -1);
            figure.paint(g);
            ImageLoader imageLoader = new ImageLoader();
            imageLoader.data = new ImageData[] { image.getImageData() };
            imageLoader.save(stream, format);
        } catch (Throwable t) {
            DroolsEclipsePlugin.log(t);
View Full Code Here


            editor.getDefinition().setDimension(new Dimension(r.width, r.height));
            image = new Image(Display.getDefault(), r.width, r.height);
            gc = new GC(image);
            g = new SWTGraphics(gc);
            g.translate(r.x * -1, r.y * -1);
            figure.paint(g);
            ImageLoader imageLoader = new ImageLoader();
            imageLoader.data = new ImageData[] { ImageHelper.downSample(image) };
            imageLoader.save(getImageSavePath(), SWT.IMAGE_JPEG);
        } catch (Exception e) {
            DesignerLogger.logError(e);
View Full Code Here

    List children = this.getChildren();
    for (int i = 0; i < children.size(); i++) {
      child = (IFigure) children.get(i);
      if (child.isVisible() && child.intersects(graphics.getClip(clip))) {
        // graphics.clipRect(child.getBounds());
        child.paint(graphics);
        graphics.restoreState();
      }
    }
  }
View Full Code Here

      img = new Image(Display.getCurrent(), fig1.getClientArea().width,
          fig1.getClientArea().height);
      imageGC = new GC(img);
      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

        monitor.worked(2);
        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

        try {
            image = new Image(Display.getDefault(), r.width, r.height);
            gc = new GC(image);
            g = new SWTGraphics(gc);
            g.translate(r.x * -1, r.y * -1);
            figure.paint(g);
            ImageLoader imageLoader = new ImageLoader();
            imageLoader.data = new ImageData[] { image.getImageData() };
            imageLoader.save(stream, format);
        } catch (Throwable t) {
            DroolsEclipsePlugin.log(t);
View Full Code Here

            SWTGraphics graphics = null;
            try
            {
                gc = new GC( image );
                graphics = new SWTGraphics( gc );
                figure.paint( graphics );

                ImageLoader loader = new ImageLoader();
                loader.data = new ImageData[] { image.getImageData() };
               
                output = new FileOutputStream( filePath );
View Full Code Here

      image = new Image(device, r.width, r.height);
      gc = new GC(image);
      g = new SWTGraphics(gc);
      g.translate(r.x * -1, r.y * -1);

      figure.paint(g);

      ImageLoader imageLoader = new ImageLoader();
      imageLoader.data = new ImageData[] { image.getImageData() };
      imageLoader.save(result, format);
    }
View Full Code Here

      image = new Image(device, r.width, r.height);
      gc = new GC(image);
      g = new SWTGraphics(gc);
      g.translate(r.x * -1, r.y * -1);

      figure.paint(g);

      ImageLoader imageLoader = new ImageLoader();
      imageLoader.data = new ImageData[] { image.getImageData() };
      imageLoader.save(result, format);
    }
View Full Code Here

      image = new Image(device, r.width, r.height);
      gc = new GC(image);
      g = new SWTGraphics(gc);
      g.translate(r.x * -1, r.y * -1);

      figure.paint(g);

      ImageLoader imageLoader = new ImageLoader();
      imageLoader.data = new ImageData[] { image.getImageData() };
      imageLoader.save(result, format);
    }
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.