Package processing.core

Examples of processing.core.PGraphics.image()


      if (GLOBAL.myMovie != null) {
        renderer.pushMatrix();
        renderer.scale(1.6f);
        //   image(GLOBAL.myMovie,width/3.2f,height/3.2f);
        renderer.popMatrix();
        renderer.image(GLOBAL.clickToStart, width / 2, height - 25);

      } else {
        renderer.image(GLOBAL.tittleImg, width / 2, height / 2);
      }
      renderer.imageMode(CORNER);
View Full Code Here


        //   image(GLOBAL.myMovie,width/3.2f,height/3.2f);
        renderer.popMatrix();
        renderer.image(GLOBAL.clickToStart, width / 2, height - 25);

      } else {
        renderer.image(GLOBAL.tittleImg, width / 2, height / 2);
      }
      renderer.imageMode(CORNER);
      renderer.image(UITools.SELECT_TOOL_CURSOR, mouseX - 10, mouseY - 8);
      //mouse clicked
      //if(mousePressed && !this.mouseDown && millis() > 1000){
View Full Code Here

      } else {
        renderer.image(GLOBAL.tittleImg, width / 2, height / 2);
      }
      renderer.imageMode(CORNER);
      renderer.image(UITools.SELECT_TOOL_CURSOR, mouseX - 10, mouseY - 8);
      //mouse clicked
      //if(mousePressed && !this.mouseDown && millis() > 1000){
      if (pmouseX != mouseX && millis() - GLOBAL.inativeCounter > 3000) {
        GLOBAL.tittleImageNum++;
View Full Code Here

    //roundrectLeft(pg, 2, 2, w - 4, h - 4, 4);

    int offsetX = (int) ((w - img.width) / 2);
    int offsetY = (int) ((h - img.height) / 2);
    pg.image(img, (int)offsetX, (int)offsetY);
    pg.endDraw();
    return pg;

  }
View Full Code Here

    pg.noFill();

    roundrect(pg, 0, 0, w + 4, h + 4, 4); //right bottom border off texture
    int offsetX = (int) ((w - img.width) / 2);
    int offsetY = (int) ((h - img.height) / 2);
    pg.image(img, (int)offsetX, (int)offsetY);
    pg.endDraw();
    return pg;

  }
View Full Code Here

    pg.stroke(200, 200, 200);
    pg.fill(255, 255, 255);

    int offsetX = (int) ((w - img.width) / 2);
    int offsetY = (int) ((h - img.height) / 2);
    pg.image(img, (int)offsetX, (int)offsetY);
    pg.endDraw();
    return pg;

  }
View Full Code Here

          float x = coord.column * TILE_WIDTH;
          float y = coord.row * TILE_HEIGHT;

          // REVISIT For transparency, do not paint image (why no transparent imgs?)
          pg.image(tile, x, y, TILE_WIDTH, TILE_HEIGHT);

          if (recent_images.contains(tile)) {
            recent_images.remove(tile);
          }
          recent_images.add(tile);
View Full Code Here

      boolean showTileCoordinates) {
    PGraphics pg = p.createGraphics(TILE_WIDTH, TILE_HEIGHT, PApplet.P2D);
    pg.beginDraw();

    if (tileImage != null) {
      pg.image(tileImage, 0, 0);
    } else {
      pg.background(250);
      pg.stroke(0);
      pg.rect(0, 0, pg.width, pg.height);
      pg.ellipse(pg.width / 2, pg.height / 2, pg.width - 5, pg.height - 5);
View Full Code Here

    PGraphics temp = p.createGraphics(img.width, img.height, PConstants.JAVA2D);
    temp.beginDraw();
    temp.smooth();
    temp.translate(temp.width / 2, temp.height / 2);
    temp.imageMode(PConstants.CENTER);
    temp.image(img, 0, 0);
    temp.endDraw();
    PImage saveArea = p.createImage(temp.width, temp.height, PConstants.ARGB);
    for (int y = 0; y < saveArea.height; y++) {
      for (int x = 0; x < saveArea.width; x++) {
        int index = y + x * saveArea.width;
 
View Full Code Here

    }
    if (mapDisplayShader != null) {
      mapDisplayShader.shadeWithMarkers(canvasPG);
    }
    canvasPG.pushStyle();
    canvasPG.image(offscreenCutoffPG, 0, 0);
    canvasPG.popStyle();
    canvasPG.popMatrix();
    // canvasPG.resetShader();
  }
}
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.