Package org.eclipse.gmf.runtime.diagram.ui.render.util

Examples of org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil


   
    // issue 193: first save as png
    {
      IPath destination = generateImageDestination(cls, ".png");
      monitor.subTask("Saving PNG image " + destination.lastSegment());
      CopyToImageUtil img = getCopyToImageUtil();
      img.copyToImage(part, destination, ImageFileFormat.PNG, new SubProgressMonitor(monitor, 1));
      saveMonitor.worked(1);
    }

    // issue 193: then save as svg
    {
      IPath destination = generateImageDestination(cls, ".svg");
      monitor.subTask("Saving SVG image " + destination.lastSegment());
      CopyToImageUtil img = getCopyToImageUtil();
      img.copyToImage(part, destination, ImageFileFormat.SVG, new SubProgressMonitor(monitor, 1));
      saveMonitor.worked(1);
    }

    saveMonitor.done();
   
View Full Code Here


   *
   * @see CopyToImageUtil#copyToImage(DiagramEditPart, IPath, ImageFileFormat, IProgressMonitor)
   * @return
   */
  protected CopyToImageUtil getCopyToImageUtil() {
    return new CopyToImageUtil();
  }
View Full Code Here

   *
   * @see CopyToImageUtil#copyToImage(DiagramEditPart, IPath, ImageFileFormat, IProgressMonitor)
   * @return
   */
  protected CopyToImageUtil getCopyToImageUtil() {
    return new CopyToImageUtil();
  }
View Full Code Here

      IProgressMonitor saveMonitor = new SubProgressMonitor(monitor, 1);
      saveMonitor.beginTask("Saving container " + part.resolveSemanticElement(), 1 + formats.size());
      for (ImageFileFormat format : formats) {
        IPath destination = generateImageDestination(container, format);
        monitor.subTask("Saving image " + destination.lastSegment() + " ( " + format.getName() + ")");
        CopyToImageUtil img = getCopyToImageUtil();
        img.copyToImage(part, destination, format, new SubProgressMonitor(monitor, 1));
        imagesSaved++;
      }
      saveMonitor.done();
    }
   
View Full Code Here

    File destinationFile = ImageRepresentation
        .allocateTempImage(imageFileFormat.toString());
    IPath destination = new Path(destinationFile.getAbsolutePath());

    CopyToImageUtil copyToImageUtil = new CopyToImageUtil();
    try {
      copyToImageUtil.copyToImage(diagramEditPart, destination,
          imageFileFormat, new NullProgressMonitor());
    } catch (CoreException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      return null;
View Full Code Here

TOP

Related Classes of org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil

Copyright © 2018 www.massapicom. 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.