public void noStroke() { g.noStroke(); }
/** * ( begin auto-generated from noStroke.xml ) * * Disables drawing the stroke (outline). If both <b>noStroke()</b> and * <b>noFill()</b> are called, nothing will be drawn to the screen. * * ( end auto-generated ) * * @webref color:setting * @see PGraphics#stroke(int, float) * @see PGraphics#fill(float, float, float, float) * @see PGraphics#noFill() */ public void noStroke() { if (recorder != null) recorder.noStroke(); g.noStroke(); }
protected void drawEikosogram(PGraphics pg) { pg.noStroke(); float x0 = 0; for (int bx = 0; bx < binCountX; bx++) { float dx = pg.width * marginalDensity[bx]; float y0 = pg.height; for (int by = 0; by < binCountY; by++) { float pxy = logY ? logDensity[bx][by] : density[bx][by]; float dy = pg.width * pg.height * pxy / dx; float f = PApplet.map(by, 0, binCountY - 1, 1, 0); pg.fill(mixColors(WHITE, COLOR, f)); pg.rect(x0, y0, dx, -dy); y0 -= dy; } x0 += dx; } }
public static void sin(PApplet parent, PGraphics g, int amt, float freq, int xDiff, float size) { float v = (PApplet.sin((float) (parent.millis()) / 1000f * PConstants.TWO_PI * freq) + 1f) / 2f; g.noStroke(); g.ellipseMode(CENTER); g.fill(v * amt); g.ellipse(-xDiff, 0, size, size); g.ellipse(0, 0, size, size); g.ellipse(xDiff, 0, size, size); }
PGraphics pg; void setup() { size(200, 200, P2D); pg = createGraphics(100, 100, P3D); } void draw() { pg.beginDraw(); pg.background(0); pg.noStroke(); pg.translate(pg.width*0.5, pg.height*0.5); pg.lights(); pg.sphere(25); pg.endDraw(); background(0, 0, 255); image(pg, 50, 50); }
protected void styles(PGraphics g) { // should not be necessary because using only the int version of color //parent.colorMode(PConstants.RGB, 255); if (stroke) { g.stroke(strokeColor); g.strokeWeight(strokeWeight); g.strokeCap(strokeCap); g.strokeJoin(strokeJoin); } else { g.noStroke(); } if (fill) { //System.out.println("filling " + PApplet.hex(fillColor)); g.fill(fillColor); } else { g.noFill(); } }
protected void styles(PGraphics g) { // should not be necessary because using only the int version of color //parent.colorMode(PConstants.RGB, 255); if (stroke) { g.stroke(strokeColor); g.strokeWeight(strokeWeight); g.strokeCap(strokeCap); g.strokeJoin(strokeJoin); } else { g.noStroke(); } if (fill) { //System.out.println("filling " + PApplet.hex(fillColor)); g.fill(fillColor); } else { g.noFill(); } }
protected void drawBoxplot(PGraphics pg) { float x0 = 0; for (int bx = 0; bx < binCountX; bx++) { float dx = pg.width * marginalDensity[bx]; pg.noStroke(); float y0 = pg.height * (1 - perc75[bx]); float dy = pg.height * (perc75[bx] - perc25[bx]); // Q1 - Q3 box pg.fill(mixColors(WHITE, COLOR, 1)); pg.rect(x0, y0, dx, dy); pg.fill(mixColors(WHITE, COLOR, 0.5f)); // Q0 - Q1 box y0 = pg.height * (1 - perc25[bx]); dy = pg.height * (perc25[bx] - perc09[bx]); pg.rect(x0, y0, dx, dy); // Q3 - Q4 box y0 = pg.height * (1 - perc91[bx]); dy = pg.height * (perc91[bx] - perc75[bx]); pg.rect(x0, y0, dx, dy); x0 += dx; } }
mask.noStroke(); mask.fill(0); mask.ellipse(width/2, height/2, 200, 200); filler.noStroke(); filler.fill(random(255), random(255), random(255)); filler.rect(random(width), random(height), random(5,40), random(5,40)); mask.noStroke(); mask.fill(255); mask.ellipse(width/2, height/2, 200, 200); mask.noStroke(); mask.fill(0); mask.ellipse(width/2, height/2, 200, 200);
canvas.beginDraw(); canvas.fill(frontColor); canvas.noStroke(); canvas.ellipse( x, y, brushSize, brushSize); canvas.endDraw();
public void draw(PGraphics pg, boolean pdf) { pg.beginDraw(); pg.background(WHITE); if (canDraw()) { pg.noStroke(); float rad = 0; int a; int count = PApplet.min(500, points.size()); rad = PApplet.map(count, 0, 500, 0.05f, 0.01f); a = (int) PApplet.map(count, 0, 500, 70, 10); pg.fill(pg.red(COLOR), pg.green(COLOR), pg.blue(COLOR), a); for (Value2D pt : points) { float px = pg.width * (float) pt.x; float py = pg.height * (float) (1 - pt.y); float pw = pg.width * rad; float ph = pg.height * rad; if (50000 < points.size()) pg.rect(px - pw / 2, py - ph / 2, pw, ph); else pg.ellipse(px, py, pw, ph); } } else { drawCross(pg); } if (pdf) pg.dispose(); pg.endDraw(); }
public void draw(PGraphics pg, boolean pdf) { pg.beginDraw(); pg.background(WHITE); if (canDraw()) { float binw = (float)pg.width / binCount; pg.noStroke(); for (int bx = 0; bx < binCount; bx++) { float p = density[bx]; float h = PApplet.map(p, 0, maxProb, 0, 0.5f); // float p = density[bx]; pg.fill(hColor); pg.rect(binw * bx, pg.height * (1 - h), binw, pg.height * h); } } else { drawCross(pg); } if (pdf) pg.dispose(); pg.endDraw(); }
public void draw(PGraphics pg, boolean pdf) { pg.beginDraw(); pg.background(WHITE); if (canDraw()) { float binw = (float)pg.width / binCountX; float binh = (float)pg.height / binCountY; pg.noStroke(); for (int bx = 0; bx < binCountX; bx++) { for (int by = 0; by < binCountY; by++) { float p = PApplet.map(density[bx][by], 0, maxProb, 0, 1); pg.fill(mixColors(WHITE, COLOR, p)); pg.rect(binw * bx, pg.height - binh * by, binw, -binh); } } } else { drawCross(pg); } if (pdf) pg.dispose(); pg.endDraw(); }
float alpha = 200 * ((1 - PApplet.cos(a)) * 0.5f); pg.fill(color(160, alpha)); pg.noStroke(); pg.triangle(x0, y0, x0 + triSize, y0, x0, y0 + triSize); } else if (depend) { pg.fill(corColor); pg.noStroke(); pg.triangle(x0, y0, x0 + triSize, y0, x0, y0 + triSize); pg.noStroke(); pg.fill(misColor); pg.triangle(pg.width - triSize, 0, pg.width, 0, pg.width, triSize);
mask.noStroke(); mask.background(opaque); mask.fill(transparent);
glow.loadPixels(); glow.fill(255,3); glow.noStroke();
canvas.rotateZ(radians(frameCount % 360)); canvas.noStroke(); canvas.fill(20, 20, 20); canvas.box(100);