Examples of pushMatrix()


Examples of processing.core.PGraphics.pushMatrix()

      // Set background color if given (can also be transparent)
      pg.background(bgColor);
    }

    // translate and scale, from the middle
    pg.pushMatrix();
    pg.translate((float) innerOffsetX, (float) innerOffsetY);
    if (pg.is3D()) {
      pg.applyMatrix(innerMatrix);
    } else {
      pg.applyMatrix(innerMatrix.m00, innerMatrix.m01, innerMatrix.m03, innerMatrix.m10, innerMatrix.m11,
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    Vector visibleKeys = getVisibleKeys(pg);

    if (visibleKeys.size() > 0) {
      Coordinate previous = (Coordinate) visibleKeys.get(0);
      pg.pushMatrix();
      pg.scale(1.0f / PApplet.pow(2, previous.zoom));

      for (int i = 0; i < visibleKeys.size(); i++) {
        Coordinate coord = (Coordinate) visibleKeys.get(i);
        if (coord.zoom != previous.zoom) {
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

      for (int i = 0; i < visibleKeys.size(); i++) {
        Coordinate coord = (Coordinate) visibleKeys.get(i);
        if (coord.zoom != previous.zoom) {
          pg.popMatrix();
          pg.pushMatrix();
          pg.scale(1.0f / PApplet.pow(2, coord.zoom));
        }

        if (images.containsKey(coord)) {
          PImage tile = (PImage) images.get(coord);
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    offscreenCutoffPG.endDraw();

    // Transforms (outer) map pane, and draws inner map + marker onto canvas
    // This cuts off marker at the border.
    PGraphics canvasPG = papplet.g;
    canvasPG.pushMatrix();
    canvasPG.translate(offsetX, offsetY);
    if (canvasPG.is3D()) {
      canvasPG.applyMatrix(matrix);
    } else {
      canvasPG.applyMatrix(matrix.m00, matrix.m01, matrix.m03, matrix.m10, matrix.m11, matrix.m13);
View Full Code Here

Examples of processing.core.PGraphicsJava2D.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());
      snap.rotate(PApplet.PI/2);
      snap.image(vsb.getBuffer(), 0, 0);
      snap.popMatrix();
    }
View Full Code Here

Examples of processing.core.PGraphicsJava2D.pushMatrix()

    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);
      snap.popMatrix();
    }
    if(vsb != null){
View Full Code Here

Examples of processing.core.PGraphicsJava2D.pushMatrix()

    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);
      snap.popMatrix();
    }
    snap.endDraw();
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.