Examples of image()


Examples of processing.core.PGraphics.image()

    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

Examples of processing.core.PGraphics.image()

          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

Examples of processing.core.PGraphics.image()

      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

Examples of processing.core.PGraphics.image()

    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

Examples of processing.core.PGraphics.image()

    }
    if (mapDisplayShader != null) {
      mapDisplayShader.shadeWithMarkers(canvasPG);
    }
    canvasPG.pushStyle();
    canvasPG.image(offscreenCutoffPG, 0, 0);
    canvasPG.popStyle();
    canvasPG.popMatrix();
    // canvasPG.resetShader();
  }
}
View Full Code Here

Examples of processing.core.PGraphics.image()

    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

Examples of processing.core.PGraphics.image()

    pg.beginDraw();
    pg.background(winApp.color(255,0));
    pg.imageMode(CORNER);

    while(px < tl){
      pg.image(centre, px, 0);
      px += centre.width;
    }

    pg.endDraw();
    centre = pg;
View Full Code Here

Examples of processing.core.PGraphicsJava2D.image()

    snap.beginDraw();
    snap.image(buffer,0,0);
    if(hsb != null){
      snap.pushMatrix();
      snap.translate(hsb.getX(), hsb.getY());
      snap.image(hsb.getBuffer(), 0, 0);
      snap.popMatrix();
    }
    if(vsb != null){
      snap.pushMatrix();
      snap.translate(vsb.getX(), vsb.getY());
View Full Code Here

Examples of processing.core.PGraphicsJava2D.image()

    }
    if(vsb != null){
      snap.pushMatrix();
      snap.translate(vsb.getX(), vsb.getY());
      snap.rotate(PApplet.PI/2);
      snap.image(vsb.getBuffer(), 0, 0);
      snap.popMatrix();
    }
    snap.endDraw();
    return snap;
  }
View Full Code Here

Examples of processing.core.PGraphicsJava2D.image()

  public PGraphics getSnapshot(){
    if(buffer != null){
      updateBuffer();
      PGraphicsJava2D snap = (PGraphicsJava2D) winApp.createGraphics(buffer.width, buffer.height, PApplet.JAVA2D);
      snap.beginDraw();
      snap.image(buffer,0,0);
      return snap;
    }
    return null;
  }
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.