Package processing.core

Examples of processing.core.PGraphics.stroke()


    pg.pushMatrix();
    pg.translate(0, content.getHeight() / 2);
    // iterate through all the graphs
    for (GraphData graph : graphs.values()) {
      pg.beginShape();
      pg.stroke(graph.color);
      for (int i=0; i<graph.data.length; ++ i) {
        pg.curveVertex(i, (float )graph.data[i]);
      }
      pg.endShape();
    }
View Full Code Here


    int wingLength = content.getWidth() / 4;
    int rudderHeight = wingLength / 2;
    int indicatorOversize = wingLength / 4;
    int fuselageRadius = wingLength / 3;
    pg.fill(COLOR_INDICATOR);
    pg.stroke(COLOR_INDICATOR);
    pg.pushMatrix();
    pg.translate(content.getWidth() / 2, content.getHeight() / 2 + (float )elevatorOffset);
    pg.rotate((float )aileronAngle);
    pg.strokeWeight(3);
    pg.line(-wingLength - indicatorOversize, 0, wingLength + indicatorOversize, 0);
View Full Code Here

    pg.ellipse(0, 0, fuselageRadius, fuselageRadius);
    pg.popMatrix();

    // draw the airplane (roll input)
    pg.fill(COLOR_PLANE);
    pg.stroke(COLOR_PLANE);
    pg.pushMatrix();
    pg.translate(content.getWidth() / 2, content.getHeight() / 2);
    pg.rotate((float )rollAngle);
    pg.strokeWeight(3);
    pg.line(-wingLength, 0, wingLength, 0);
View Full Code Here

    pg.background(255);
    pg.rect(0,0,w,h);
   
   
    pg.smooth();
    pg.stroke(200, 200, 200);
    pg.fill(194, 217, 216);

    pg.strokeWeight(1);

    roundrect(pg, 0, 0, w + 4, h + 4, 4);
View Full Code Here

   
    pg.noStroke();

    pg.smooth();
    pg.strokeWeight(1);
    pg.stroke(200, 200, 200);
    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);
View Full Code Here

    pg.beginDraw();
    pg.smooth();
   
    pg.noStroke();

    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);
View Full Code Here

        //Graphics
        PGraphics graphics = target.getGraphics();

        if (borderSize > 0) {
            graphics.stroke(borderColor.getRed(), borderColor.getGreen(), borderColor.getBlue(), alpha);
            graphics.strokeWeight(borderSize);
        } else {
            graphics.noStroke();
        }
        graphics.fill(color.getRed(), color.getGreen(), color.getBlue(), alpha);
View Full Code Here

    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);
    }

    if (showTileCoordinates) {
View Full Code Here

      pg.text(infoText, pg.width / 2 - pg.textWidth(infoText) / 2, pg.height / 2 - 10);
    }

    if (showDebugBorder) {
      pg.strokeWeight(2);
      pg.stroke(255, 0, 0, 100);
      pg.noFill();
      pg.rect(0, 0, pg.width, pg.height);
    }

    pg.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.