Package processing.core

Examples of processing.core.PImage.copy()


        PImage image = applet.loadImage(path);
        PImage imageCpy = applet.createImage(40, 40, 2);

        if (image.width > image.height)
          imageCpy.copy(image, 0, 0, image.height, image.height, 0,
              0, 40, 40);
        else
          imageCpy.copy(image, 0, 0, image.width, image.width, 0, 0,
              40, 40);
View Full Code Here


        if (image.width > image.height)
          imageCpy.copy(image, 0, 0, image.height, image.height, 0,
              0, 40, 40);
        else
          imageCpy.copy(image, 0, 0, image.width, image.width, 0, 0,
              40, 40);

        //image.resize(40, 40);

        button = new GUIButton(0, 0, imageCpy, null, GLOBAL.applet, gui);
View Full Code Here

        PImage image = applet.loadImage(path);
        PImage imageCpy = applet.createImage(thumbSize, thumbSize, 2);

        if (image.width > image.height)
          imageCpy.copy(image, 0, 0, image.height, image.height, 0,
              0, thumbSize, thumbSize);
        else
          imageCpy.copy(image, 0, 0, image.width, image.width, 0, 0,
              thumbSize, thumbSize);
View Full Code Here

        if (image.width > image.height)
          imageCpy.copy(image, 0, 0, image.height, image.height, 0,
              0, thumbSize, thumbSize);
        else
          imageCpy.copy(image, 0, 0, image.width, image.width, 0, 0,
              thumbSize, thumbSize);

        //image.resize(40, 40);

        button = new GUIButton(0, 0, imageCpy, null, GLOBAL.applet, gui);
View Full Code Here

    for (int row = 0; row < _tileImage.height / _tileHeight; row++) {
      for (int col = 0; col < _tileImage.width / _tileWidth; col++) {
        //Create a new image slice that corresponds to the size of the tiles in this set
        PImage slice = Hermes.getPApplet().createImage(_tileWidth, _tileHeight, Hermes.getPApplet().ARGB);
        //Copy pixels from the originally sourced image
        slice.copy(_tileImage, col * _tileWidth, row * _tileHeight, _tileWidth,  _tileHeight, 0, 0, _tileWidth, _tileHeight);

        _slicedTiles[row][col] = slice; //add the slice to our array of slices
      }
    }
  }
View Full Code Here

  {
    PImage img = p.loadImage(filename);
    Dimension d = Toolkit.getDefaultToolkit().getBestCursorSize(img.width,
        img.height);
    PImage resized = p.createImage(d.width, d.height, PImage.ARGB);
    resized.copy(img, 0, 0, img.width, img.height, 0, 0, img.width,
        img.height);
    Image image = UIUtils.PImageToImage(resized);
    return Toolkit.getDefaultToolkit().createCustomCursor(image,
        new java.awt.Point(offsetX, offsetY), "asdf");
  }
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.