# Text drawing seems to be happening out of order, compared to a filter(BLUR)

**URL:** <https://discourse.processing.org/t/text-drawing-seems-to-be-happening-out-of-order-compared-to-a-filter-blur/37224>\
**Category:** Coding Questions\
**Created:** [May 30, 2022, 1:05pm UTC](https://discourse.processing.org/t/text-drawing-seems-to-be-happening-out-of-order-compared-to-a-filter-blur/37224 "2022-05-30T13:05:58Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [May 30, 2022, 5:56pm UTC](https://discourse.processing.org/t/text-drawing-seems-to-be-happening-out-of-order-compared-to-a-filter-blur/37224/5 "2022-05-30T17:56:33Z")

</div>

Hello,

The framerate drops significantly with filter(BLUR).

You are doing a rotation about the origin (0, 0) in the corner and won’t see all of the lines.

I was trying to improve performance:

- I removed the rotate() and used smaller loop iterations.
- You could extend the random limits beyond the sketch window for a similar effect.

Test code:

```auto
String name = "Hello";

void setup()
 {
 size(800, 800, P2D);
 textSize(48);
 }

void draw()
  {
  background(0);
  drawIt();
  println(frameRate);
  }

void drawIt() {
    background(0);
    strokeWeight(4);

    pushMatrix();
    for (int j=0; j<10; j++) 
      { 
      for (int i=0; i<10; i++) 
        {
        fill(150, random(200), 30);
        stroke(150, random(200), 30);
        line(random(width), random(height), random(width), random(height));
        }
      filter(BLUR);
      //rotate(j*0.4);
      }
    popMatrix();
    fill(255, 255, 255, 255);
    stroke(255, 255, 255, 255);
    //textSize(48);
    text(name, 40, 100);    
    //saveFrame("background.png");
  }

```

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/c/c/cc658e61983bbb6d9d538bab84870fde1a43a7fd.jpeg)

The loading of this loop and resulting slow frameRate should be considered.

Try it commenting the _filter(BLUR)_ and see what happens.

I don’t think this is related but sharing nonetheless:

> [@Blurry Text Solution](https://discourse.processing.org/t/blurry-text-solution/11293):
>
> I was using different text sizes in a recent project and was getting blurry fonts. I solve this issue by setting the largest text size in setup() and problem solved! Here is the code I used to test this: /\* Project: Blurry Text Author: GLV Date: 2019-05-15 Version: 01 \*/ void settings() { size(1024, 768, P3D); } void setup() { textSize(128); // Set to largest text size used to prevent blurring of text } void draw() { background(0); text24(); t…

`:)`

---

_[View the full topic](https://discourse.processing.org/t/text-drawing-seems-to-be-happening-out-of-order-compared-to-a-filter-blur/37224)._
