# PShape issues with noFill()

**URL:** <https://discourse.processing.org/t/pshape-issues-with-nofill/18505>\
**Category:** Coding Questions\
**Created:** [March 8, 2020, 4:15pm UTC](https://discourse.processing.org/t/pshape-issues-with-nofill/18505 "2020-03-08T16:15:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![esc746](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/esc746/32/4258_2.png) [@esc746](https://discourse.processing.org/u/esc746)\
**Post date:** [March 8, 2020, 4:15pm UTC](https://discourse.processing.org/t/pshape-issues-with-nofill/18505/1 "2020-03-08T16:15:30Z")

</div>

When using PShape the noFill() method appears to be missing in action. The following code demonstrates a workaround.

Curiously, if I try the P2D renderer, I get no circles at all.

Note also the comment about setStrokeWeight(). Surely this is a bug that should be fixed?

```auto
int BLACK = 0;
int WHITE = 255;
int DENSITY = 500;

void setup() {
    size(800, 800, FX2D);
    background(WHITE);

    circler(20, 0);
    circler(60, 100);
    circler(120, 140);
    circler(180, 200);
}

void circler(float r, int c) {
    // define a shape
    PShape circlet; 

    // valid primitives: LINE, ELLIPSE, RECT, ARC, TRIANGLE, SPHERE, BOX, QUAD
    circlet = createShape(ELLIPSE, 0, 0, r, r);
    circlet.setStroke(c);

    // No support for this method? Use a trick!
    // circlet.noFill();
    circlet.setFill( color(WHITE, 0) );

    // strangely this method doesn't highlight as legal (blue)
    // also: value must be a float or it's ignored
    circlet.setStrokeWeight(6.);

    // draw
    pushMatrix();   
    translate(width/2, height/2);
    shape(circlet, 0, 0);
    popMatrix();
}

```

---

<div class="post-metadata">

**Author:** ![hotfooted](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hotfooted/32/3670_2.png) [@hotfooted](https://discourse.processing.org/u/hotfooted)\
**Post date:** [March 8, 2020, 10:20pm UTC](https://discourse.processing.org/t/pshape-issues-with-nofill/18505/2 "2020-03-08T22:20:41Z")

</div>

if you check out this [page](https://processing.org/tutorials/pshape/) you will find this

> It should be noted that unlike with fill() and stroke() you must pass a full color as an argument. i.e. instead of saying “setFill(255,0,0)” for a red fill, you’ll need to say “setFill(color(255,0,0))”. In addition, setFill() and setStroke() can take a boolean argument (e.g. setFill(false)) to turn the fill or stroke on or off

i think noFill() is more for when you are using beginShape() endShape() I’ll let you figure all that out I just thought I’d point out the above. so basically your code with the change:

```auto
int BLACK = 0;
int WHITE = 255;
int DENSITY = 500;

void setup() {
    size(640, 480, P2D);
    background(255,0,255);

    circler(20, color(0, 0, 0));
    circler(60, color(100, 100, 100));
    circler(120, color(140, 140, 140));
    circler(180, color(200,200, 200));
}

void circler(float r, int c) {
    // define a shape
    PShape circlet; 

    // valid primitives: LINE, ELLIPSE, RECT, ARC, TRIANGLE, SPHERE, BOX, QUAD
    circlet = createShape(ELLIPSE, 0, 0, r, r);
    circlet.setStroke(c);

    // No support for this method? Use a trick!
    // circlet.noFill();
    circlet.setFill(false);

    // strangely this method doesn't highlight as legal (blue)
    // also: value must be a float or it's ignored
    circlet.setStrokeWeight(6.);

    // draw
    pushMatrix();   
    translate(width/2, height/2);
    shape(circlet, 0, 0);
    popMatrix();
}

```
