public void strokeWeight(float weight) { g.strokeWeight(weight); }
@Override public void strokeWeight(float weight) { super.strokeWeight(weight); strokePaint.setStrokeWidth(weight); }
/** * ( begin auto-generated from strokeWeight.xml ) * * Sets the width of the stroke used for lines, points, and the border * around shapes. All widths are set in units of pixels. * <br/> <br/> * When drawing with P3D, series of connected lines (such as the stroke * around a polygon, triangle, or ellipse) produce unattractive results * when a thick stroke weight is set (<a * href="http://code.google.com/p/processing/issues/detail?id=123">see * Issue 123</a>). With P3D, the minimum and maximum values for * <b>strokeWeight()</b> are controlled by the graphics card and the * operating system's OpenGL implementation. For instance, the thickness * may not go higher than 10 pixels. * * ( end auto-generated ) * * @webref shape:attributes * @param weight the weight (in pixels) of the stroke * @see PGraphics#stroke(int, float) * @see PGraphics#strokeJoin(int) * @see PGraphics#strokeCap(int) */ public void strokeWeight(float weight) { if (recorder != null) recorder.strokeWeight(weight); g.strokeWeight(weight); }
@Override public void strokeWeight(float weight) { super.strokeWeight(weight); context.setLineWidth(weight); }
@Override public void strokeWeight(float weight) { super.strokeWeight(weight); strokeImpl(); }
protected void drawCross(PGraphics pg) { float x0 = 0.4f * pg.width; float y0 = 0.4f * pg.height; float x1 = 0.6f * pg.width; float y1 = 0.6f * pg.height; pg.stroke(160, 30); pg.strokeWeight(pg.width * 0.05f); pg.line(x0, y0, x1, y1); pg.line(x1, y0, x0, y1); }
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(); } }
graph.strokeWeight(2); graph.line(i,vals[i],i+1,vals[i+1]);
PShape createReticle() { final int RADIUS = 64; PGraphics buffer = createGraphics(RADIUS, RADIUS); buffer.beginDraw(); buffer.background(0, 0); // transparent buffer.stroke(255); buffer.strokeWeight(4); buffer.ellipseMode(CENTER); buffer.ellipse(RADIUS / 2, RADIUS / 2, RADIUS / 3, RADIUS / 3); buffer.strokeWeight(8.0f); buffer.line(RADIUS/2, 0, RADIUS/2, RADIUS - 1); buffer.line(0, RADIUS/2, RADIUS-1, RADIUS/2); buffer.endDraw(); PShape face = createShape(); face.beginShape(QUAD); face.noStroke(); face.textureMode(NORMAL); face.texture(buffer); face.vertex(-1, -1, 0, 0, 0); face.vertex(1, -1, 0, 1, 0); face.vertex(1, 1, 0, 1, 1); face.vertex(-1, 1, 0, 0, 1); face.endShape(); return face; }
pg.stroke(255); pg.noFill(); pg.strokeWeight(0.5); pg.rect (0,0,100,100); pg.endDraw();
strokeWeight(DEFAULT_STROKE_WEIGHT); strokeJoin(DEFAULT_STROKE_JOIN); strokeCap(DEFAULT_STROKE_CAP);
raw.strokeWeight(weight); raw.stroke(argb0); raw.vertex(pt0[X], pt0[Y], pt0[Z]); float sx0 = screenXImpl(pt0[0], pt0[1], pt0[2], pt0[3]); float sy0 = screenYImpl(pt0[0], pt0[1], pt0[2], pt0[3]); raw.strokeWeight(weight); raw.stroke(argb0); raw.vertex(sx0, sy0);
raw.strokeWeight(weight); raw.stroke(argb0); raw.vertex(pt0[X], pt0[Y], pt0[Z]); float sx0 = screenXImpl(pt0[0], pt0[1], pt0[2], pt0[3]); float sy0 = screenYImpl(pt0[0], pt0[1], pt0[2], pt0[3]); raw.strokeWeight(weight); raw.stroke(argb0); raw.vertex(sx0, sy0);
raw.strokeWeight(weight); raw.stroke(argb0); raw.vertex(pt0[X], pt0[Y], pt0[Z]); float sx0 = g.screenXImpl(pt0[0], pt0[1], pt0[2], pt0[3]); float sy0 = g.screenYImpl(pt0[0], pt0[1], pt0[2], pt0[3]); raw.strokeWeight(weight); raw.stroke(argb0); raw.vertex(sx0, sy0);
strokeWeight(DEFAULT_STROKE_WEIGHT); strokeJoin(DEFAULT_STROKE_JOIN); strokeCap(DEFAULT_STROKE_CAP);
raw.strokeWeight(weight); raw.stroke(argb0); raw.vertex(pt0[X], pt0[Y], pt0[Z]); float sx0 = g.screenXImpl(pt0[0], pt0[1], pt0[2], pt0[3]); float sy0 = g.screenYImpl(pt0[0], pt0[1], pt0[2], pt0[3]); raw.strokeWeight(weight); raw.stroke(argb0); raw.vertex(sx0, sy0);
pg.beginDraw(); pg.background(0,0); pg.strokeWeight(10); pg.stroke(255,100,0); pg.line(100,50,100,150);
PShape createTextGraphics(String s) { PGraphics buffer = createGraphics(width/2, height); buffer.beginDraw(); buffer.strokeWeight(8.0f); buffer.background(color(0,128,0)); buffer.stroke(0xff, 0, 0); buffer.text(s, 0, height / 4); buffer.stroke(255); buffer.textSize(64f); buffer.text(s, 0, height / 3); buffer.stroke(0x0000FF); buffer.textSize(128); buffer.text(s, 0, height / 2 + height / 4); buffer.fill(color(128, 0, 128)); buffer.rect(400, 200, 400, 400); buffer.stroke(128); buffer.line(0, 0, width / 2, height); buffer.endDraw(); PShape face = createShape(); face.beginShape(QUAD); face.noStroke(); face.textureMode(NORMAL); face.texture(buffer); face.vertex(-1, -1, 0, 0, 0); face.vertex(1, -1, 0, 1, 0); face.vertex(1, 1, 0, 1, 1); face.vertex(-1, 1, 0, 0, 1); face.endShape(); return face; }
pg.strokeWeight(2); pg.rect(0, 0, pg.width, pg.height); pg.endDraw();