Blue border/margin around rectangle

I’m facing a weird problem. When I draw a rectangle as part of my HUD, it is drawn with a blue border even though I don’t actually ever specify this color in my code anywhere. Do you have any idea why this is and how to get rid of it? This is the relevant part of the code:

// Add title
void addTitle() {
  cam.beginHUD();
  fill(120);
  rect(0, 0, width, 35);
  fill(255);
  textAlign(CENTER);
  textSize(100); // hack to make font render more smoothly
  scale(0.2);
  text("My title", 3232, 100);
  cam.endHUD();
}

This is what it looks like:

Hi @tea_tree

I might be guessing but do you have at any point of your code definition of line stroke with that color?

Best regards

1 Like

I agree.

Try noStroke(); before the rect command

Also, to improve the font in 3D:

  //text 
  textMode(SHAPE);

I also recommend to use a normal font size and get rid of scale(0.2);

1 Like