Examples of copyArea()


Examples of java.awt.Graphics2D.copyArea()

                (displayHost.getPeer().canDetermineObscurity() && !displayHost.getPeer().isObscured()));
        }

        if (optimizeScrolling) {
            try {
                graphics.copyArea(blitX, blitY, blitWidth, blitHeight, -deltaScrollLeft, 0);
            } catch (Throwable throwable) {
                // Due to Sun bug #6293145, we cannot call copyArea if scaling is
                // applied to the graphics context, so we fall back gracefully here
                optimizeScrolling = false;
            }
View Full Code Here

Examples of javax.microedition.lcdui.Graphics.copyArea()

    hero.clock();

    // scroll the worldPanel to the left
    Graphics g = gameLayer.getGraphics();

    g.copyArea(clockStep, 0, gameLayer.getWidth() - clockStep, gameLayer.getHeight(), 0, 0, Graphics.TOP | Graphics.LEFT);
 
    Graphics wg = worldLayer.getGraphics();
    wg.copyArea(clockStep, 0, gameLayer.getWidth() - clockStep, gameLayer.getHeight(), 0, 0, Graphics.TOP | Graphics.LEFT);

   
View Full Code Here

Examples of javax.microedition.lcdui.Graphics.copyArea()

    Graphics g = gameLayer.getGraphics();

    g.copyArea(clockStep, 0, gameLayer.getWidth() - clockStep, gameLayer.getHeight(), 0, 0, Graphics.TOP | Graphics.LEFT);
 
    Graphics wg = worldLayer.getGraphics();
    wg.copyArea(clockStep, 0, gameLayer.getWidth() - clockStep, gameLayer.getHeight(), 0, 0, Graphics.TOP | Graphics.LEFT);

   
    score++;
    caveGeneratorCounter++;
View Full Code Here

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

  }
 
  public void writeScreenShot(OutputStream to){
    Image screenShot = new Image(parent.getDisplay(), (int)viewPortSize.getX()+1 ,(int)viewPortSize.getY()+1);
    GC gc = new GC(parent);
    gc.copyArea(screenShot, 0,0);
    gc.dispose();
    ImageLoader il = new ImageLoader();
    il.data = new ImageData[] {screenShot.getImageData()};
    il.save(to, SWT.IMAGE_PNG);
  }
View Full Code Here

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

    theShell.setBounds(getAnimationShell().getBounds());

    // Capture the background image   
    backingStore = new Image(theShell.getDisplay(), psRect);
    GC gc = new GC(display);
    gc.copyArea(backingStore, psRect.x, psRect.y);
    gc.dispose();
//    changeCoordinates();
//    captureImages();
    theShell.setBackgroundImage(backingStore);
    theShell.setVisible(true);
View Full Code Here

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

    for (Iterator iterator = getStartRects().iterator(); iterator.hasNext();) {
      Rectangle rect = (Rectangle) iterator.next();
      Image image = new Image(display, rect.width, rect.height);
      GC gc = new GC(backingStore);
      gc.copyArea(image, rect.x, rect.y);
      gc.dispose();
      ImageCanvas canvas = new ImageCanvas(theShell, SWT.BORDER
          | SWT.NO_BACKGROUND, image);
      controls.add(canvas);
View Full Code Here

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

      GC gc = new GC(wb);
     
      // Loop 'n' times to average the result
        long startTime = System.currentTimeMillis();
      for (int i = 0; i < IMAGE_ANIMATION_TEST_LOOP_COUNT; i++)
        gc.copyArea(backingStore, bb.x, bb.y);     
      gc.dispose();
      long endTime = System.currentTimeMillis();
     
      // get Frames / Sec
      double fps = IMAGE_ANIMATION_TEST_LOOP_COUNT / ((endTime-startTime) / 1000.0);
View Full Code Here

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

    Image image = null;
    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()

      Rectangle bounds = display.getBounds();
      int width = bounds.width;
      int height = bounds.height;

      image = new Image(display, width, height);
      gc.copyArea(image, 0, 0);
      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()

    Image image = null;
    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
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.