Examples of beginDraw()


Examples of processing.core.PGraphics.beginDraw()

    float h = (getController().labelSize + g.textDescent()+ g.textAscent()) * ln;
    PGraphics textG = getController().appletStatic.createGraphics((int) w,
        (int) h, PApplet.OPENGL);
   
    this.setSize(w, h);
    textG.beginDraw();
    textG.smooth(2);
    //textG.background(255);
   
    //textG.textMode(PApplet.SCREEN);
    textG.textSize(this.textSize);
View Full Code Here

Examples of processing.core.PGraphics.beginDraw()

  /**
   * Draws the on the PGraphics canvas.
   */
  public void draw() {
    PGraphics pg = getInnerPG();
    pg.beginDraw();

    // Clears canvas (set to transparency, to not smudge previous map on panning)
    pg.clear();
    if (bgColor != null) {
      // Set background color if given (can also be transparent)
View Full Code Here

Examples of processing.core.PGraphics.beginDraw()

  // Create debug tile, and draw it on top of the loaded tile
  public static PImage getDebugTile(Coordinate coord, PImage tileImage, PApplet p, boolean showDebugBorder,
      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);
View Full Code Here

Examples of processing.core.PGraphics.beginDraw()

  }

  // By amnon.owed, http://forum.processing.org/topic/extract-circle-texture-from-background-with-alpha-channel
  public PImage getCircularImage(PImage img, int radius, int feather) {
    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();
View Full Code Here

Examples of processing.core.PGraphics.beginDraw()

  }

  // By amnon.owed, http://forum.processing.org/topic/extract-circle-texture-from-background-with-alpha-channel
  public PImage getCircularImage(PImage img, int radius, int feather) {
    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();
View Full Code Here

Examples of processing.core.PGraphics.beginDraw()

    PGraphics pg = winApp.createGraphics(tl, centre.height, JAVA2D);
    int rem = tl % centre.width;
    int n = tl / centre.width;
    n = (rem == 0) ? n : n + 1;
    int px = (tl - centre.width * n)/2;
    pg.beginDraw();
    pg.background(winApp.color(255,0));
    pg.imageMode(CORNER);

    while(px < tl){
      pg.image(centre, px, 0);
View Full Code Here

Examples of processing.core.PGraphicsJava2D.beginDraw()

   */
  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

Examples of processing.core.PGraphicsJava2D.beginDraw()

  }

  public PGraphics getSnapshot(){
    updateBuffer();
    PGraphicsJava2D snap = (PGraphicsJava2D) winApp.createGraphics(buffer.width, buffer.height, PApplet.JAVA2D);
    snap.beginDraw();
    snap.image(buffer,0,0);
    if(hsb != null){
      snap.pushMatrix();
      snap.translate(hsb.getX(), hsb.getY());
      snap.image(hsb.getBuffer(), 0, 0);
View Full Code Here

Examples of processing.core.PGraphicsJava2D.beginDraw()

  }

  public PGraphics getSnapshot(){
    updateBuffer();
    PGraphicsJava2D snap = (PGraphicsJava2D) winApp.createGraphics(buffer.width, buffer.height, PApplet.JAVA2D);
    snap.beginDraw();
    snap.image(buffer,0,0);
    if(hsb != null){
      snap.pushMatrix();
      snap.translate(hsb.getX(), hsb.getY());
      snap.image(hsb.getBuffer(), 0, 0);
View Full Code Here

Examples of processing.core.PGraphicsJava2D.beginDraw()

      p.noLoop();
      int width = Math.min(1600, p.width * 4);
      int height = Math.min(1200, p.height * 4);
      PGraphicsJava2D canvas = (PGraphicsJava2D) p.createGraphics(width,
          height, PConstants.JAVA2D);
      canvas.beginDraw();
      prettyHints(canvas);
      canvas.background(255);
      r.render(canvas, 0, 0, canvas.width, canvas.height,true);
      canvas.endDraw();
      canvas.loadPixels();
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.