Package processing.core

Examples of processing.core.PGraphics.fill()


    // draw the horizon
    double radius = (content.getHeight() / 2);
    pg.pushMatrix();
    pg.translate(0, (float )radius);
    // draw the ground (background)
    pg.fill(COLOR_GROUND);
    pg.rect(0, (float )-radius, content.getWidth(), content.getHeight());
    // draw the sky (pitch input)
    pg.fill(COLOR_SKY);
    if (Math.cos(pitchAngle) > 0) {
      pg.rect(0, (float )(Math.sin(pitchAngle) * radius), content.getWidth(), -content.getHeight());
View Full Code Here


    pg.translate(0, (float )radius);
    // draw the ground (background)
    pg.fill(COLOR_GROUND);
    pg.rect(0, (float )-radius, content.getWidth(), content.getHeight());
    // draw the sky (pitch input)
    pg.fill(COLOR_SKY);
    if (Math.cos(pitchAngle) > 0) {
      pg.rect(0, (float )(Math.sin(pitchAngle) * radius), content.getWidth(), -content.getHeight());
    }
    else {
      pg.rect(0, (float )-(Math.sin(pitchAngle) * radius), content.getWidth(), content.getHeight());
View Full Code Here

    double elevatorOffset = Math.sin(elevatorAngle) * radius;
    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);
View Full Code Here

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

    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.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);
    pg.endDraw();
View Full Code Here

    textG.textFont(getController().myFontMedium,this.textSize);
    //textG.textFont(myFont);
    //textG.textMode(PApplet.SCREEN);
    //textG.alpha(1);
    //textG.background(255, 255, 255, 0);
    textG.fill(0);
   
   
    //LOGGER.info("s"+this.textSize);
    /*
    LOGGER.info(this.labelStr);
 
View Full Code Here

            graphics.stroke(borderColor.getRed(), borderColor.getGreen(), borderColor.getBlue(), alpha);
            graphics.strokeWeight(borderSize);
        } else {
            graphics.noStroke();
        }
        graphics.fill(color.getRed(), color.getGreen(), color.getBlue(), alpha);
        graphics.rect(x, y, size, size);
    }

    public void renderSquaresPDF(Item item, PDFTarget target, PreviewProperties properties) {
        //TODO Not implemented
View Full Code Here

      pg.rect(0, 0, pg.width, pg.height);
      pg.ellipse(pg.width / 2, pg.height / 2, pg.width - 5, pg.height - 5);
    }

    if (showTileCoordinates) {
      pg.fill(0);
      String infoText = (int) coord.column + ", " + (int) coord.row + "\nz: " + (int) coord.zoom;
      pg.text(infoText, pg.width / 2 - pg.textWidth(infoText) / 2, pg.height / 2 - 10);
    }

    if (showDebugBorder) {
View Full Code Here

    {
      MenuItem i = lastPressed;
      PGraphics pg = canvas.g;
      int alpha = (int) (menu.alpha * 255);
      Color c = menu.style.strokeColor;
      pg.fill(menu.canvas.color(c.getRed(), c.getGreen(), c.getBlue(),
          alpha));

      float height = i.getWidth() / 8;
      switch (rotation.rot)
      {
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.