Examples of copyArea()


Examples of org.eclipse.swt.graphics.GC.copyArea()

            Control from    = transitionable.getControl(lastItem);
            Rectangle size  = from.getBounds();
            Image imgFrom   = new Image(from.getDisplay(), size.width, size.height);
            GC gcfrom       = new GC(from);
            from.update();
            gcfrom.copyArea(imgFrom, 0, 0);
            gcfrom.dispose();
           
            //capture an image of the "to" view
            Control to  = transitionable.getControl(currentItem);
            transitionable.setSelection(currentItem);
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.copyArea()

        canvas.setBounds(from.getBounds());
       
        Image imgFrom = new Image(Display.getCurrent(), size.width, size.height);
        GC gcfrom = new GC(from);
        System.out.println("from: " + from.getData());
        gcfrom.copyArea(imgFrom, 0, 0);
//        ImageLoader loader = new ImageLoader();
//        loader.data = new ImageData[]{imgFrom.getImageData()};
//        loader.save("E:\\from.bmp", SWT.IMAGE_BMP);
        gcfrom.dispose();
       
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.copyArea()

        gcfrom.dispose();
       
        Image imgTo = new Image(Display.getCurrent(), size.width, size.height);
        GC gcto = new GC(to);
        System.out.println("to: " + to.getData());
        gcto.copyArea(imgTo, 0, 0);
//        loader.data = new ImageData[]{imgTo.getImageData()};
//        loader.save("E:\\to.bmp", SWT.IMAGE_BMP);
        gcto.dispose();
       
        GC gcOn = new GC(canvas);
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.copyArea()

      parentDir.mkdirs();
    try {
      log.debug(MessageFormat.format("Capturing screenshot ''{0}''", fileName)); //$NON-NLS-1$

      image = new Image(display, bounds.width, bounds.height);
      gc.copyArea(image, bounds.x, bounds.y);
      ImageLoader imageLoader = new ImageLoader();
      imageLoader.data = new ImageData[] { image.getImageData() };
      imageLoader.save(fileName, new ImageFormatConverter().imageTypeOf(fileName.substring(fileName.lastIndexOf('.') + 1)));
      return true;
    } catch (Exception e) {
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.copyArea()

              nsImage});
      // Create the result image
      Image image = new Image(Display.getCurrent(), width, height);
      // Manually copy because the image's data handle isn't available
      GC gc = new GC(tempImage);
      gc.copyArea(image, 0, 0);
      gc.dispose();
      // Dispose of the temporary image allocated in the native call
      tempImage.dispose();
      return image;
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.copyArea()

              new Integer(0)});
      // Create the result image
      Image image = new Image(Display.getCurrent(), width, height);
      // Manually copy because the image's data handle isn't available
      GC gc = new GC(tempImage);
      gc.copyArea(image, 0, 0);
      gc.dispose();
      // Dispose of the temporary image allocated in the native call
      tempImage.dispose();
      return image;
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.copyArea()

              new Integer(0)});
      // Create the result image
      Image image = new Image(Display.getCurrent(), width, height);
      // Manually copy because the image's data handle isn't available
      GC gc = new GC(tempImage);
      gc.copyArea(image, 0, 0);
      gc.dispose();
      // Dispose of the temporary image allocated in the native call
      tempImage.dispose();
      return image;
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.copyArea()

      // Create the result image
      Rectangle shellBounds = getBounds();
      Image image = new Image(Display.getCurrent(), shellBounds.width, shellBounds.height);
      // Manually copy because the image's data handle isn't available
      GC gc = new GC(tempImage);
      gc.copyArea(image, 0, 0);
      gc.dispose();
      // Dispose of the temporary image allocated in the native call
      tempImage.dispose();
      return image;
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.copyArea()

              new Integer(0)});
      // Create the result image
      Image image = new Image(Display.getCurrent(), width, height);
      // Manually copy because the image's data handle isn't available
      GC gc = new GC(tempImage);
      gc.copyArea(image, 0, 0);
      gc.dispose();
      // Dispose of the temporary image allocated in the native call
      tempImage.dispose();
      return image;
    }
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.copyArea()

    addEndRect(endRect);
   
    // Capture the background image   
    backingStore = new Image(theShell.getDisplay(), psRect);
    GC gc = new GC(display);
      gc.copyArea(backingStore, psRect.x, psRect.y);
    gc.dispose();
   
    theShell.setBackgroundImage(backingStore);
    theShell.setVisible(true);
    display.update();
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.