# Circles drawing differently in active and static modes

**URL:** <https://discourse.processing.org/t/circles-drawing-differently-in-active-and-static-modes/37735>\
**Category:** Beginners\
**Created:** [June 27, 2022, 4:20pm UTC](https://discourse.processing.org/t/circles-drawing-differently-in-active-and-static-modes/37735 "2022-06-27T16:20:03Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 29, 2022, 1:43am UTC](https://discourse.processing.org/t/circles-drawing-differently-in-active-and-static-modes/37735/4 "2022-06-29T01:43:16Z")

</div>

> [@jb4x](#):
>
> Otherwise, the semi-transparent pixels add up until they appear fully white.

Hello,

I believe this is due to the smoothing that is applied each frame and is not related to transparency.

Code to visualize this:

```auto
// Smooth and anti- aliasing
// v1.0.0
// GLV 2022-06-28

PImage img; 

void setup() 
  {
  size(650, 650);
  background(255); // Try (0)
  smooth(2); //Default. Try other values!
  //noSmooth(); // Try it with this!
  frameRate(1); // Slow things down to visualize
  }
  
void draw() 
  {
  noStroke();
  fill(255, 0, 0);
  circle(15, 15, 25);
  img = get(0, 0, 30, 30); // gets a rectangular section of image
  
  translate(30, 30);
  // Magnifies 20x
  int m = 20;
  for(int y = 0; y< img.height; y++)
    {
    for(int x = 0; x< img.width; x++)
      {
      int c = img.pixels[x+y*img.width];
      fill(c);
      rect(x*m, y*m, m, m);
      }
    }
  }
  
// Save a frame
void keyPressed()
  {
  saveFrame(str(frameCount) + ".png");
  }

```

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/9/1987c48cb199fff5f39ae7651577413e517ce305.png)

References:

- [https://github.com/processing/processing4/blob/master/core/src/processing/core/PApplet.java#L1133](https://github.com/processing/processing4/blob/master/core/src/processing/core/PApplet.java#L1133)

- [https://processing.org/reference/smooth\_.html](https://processing.org/reference/smooth_.html)

- [Java and anti-aliasing](https://blog.idrsolutions.com/2011/08/java-and-anti-aliasing/) \< Nice explanation.

`:)`

---

_[View the full topic](https://discourse.processing.org/t/circles-drawing-differently-in-active-and-static-modes/37735)._
