dotted line border around sketch window
in
Integration and Hardware
•
1 month ago
When my sketch, which has a black background, runs on the web on a page also with a black background, there is a grey fine-dotted border around the sketch window.
I would very much like to get rid of it -- I've checked the ref., three books, and can't find anything about this mysterious border.
The interesting thing is, that when the sketch/page first loads, there is no border. Thereafter it appears with each mouse click----which tells me that the issue is in my code -- but I am unable to find it.
I have changed all sorts of things which might be related to a border, but nothing changes.
I would very much like to get rid of it -- I've checked the ref., three books, and can't find anything about this mysterious border.
The interesting thing is, that when the sketch/page first loads, there is no border. Thereafter it appears with each mouse click----which tells me that the issue is in my code -- but I am unable to find it.
I have changed all sorts of things which might be related to a border, but nothing changes.
- ////////////////////////////////////////////
// Clair Dunn 15SEP2013 CHAOS OUT OF ORDER
////////////////////////////////////////////
int i;
void draw() {
// stroke(0); //tried this to see if border vanished - didn't
};
void setup()
{
size (500, 500);
background(0);
for (int i=0; i<100; i++)
{
drawRectangle(random(width), random(height), random(200), random(200));
}
}
void drawRectangle(float x, float y, float w, float h)
{
if (x+width/2 >=499)
{
fill(random(255), random(255), random(255));
stroke(0);
strokeWeight(2);
triangle (x-200, int (random(400)), 100, 100, 35, int(random(150)));
}
else
{
int opacity = int (random(255));
noStroke();
fill(random(255), random(255), random(255), opacity);
rect( x, y, w, h);
}
}
void mousePressed()
{
// background(random(255), random(255), random(255));
background(0);
for (int i=0; i<100; i++)
{
noStroke();
drawRectangle(random(width), random(height), random(200), random(200));
}
}
You can't see the border when you just run it in the processing window, but you can see it on the web if you need to.
http://www.clairdunn.com/chaos-out-of-order.htm
Thanks much for any ideas!
1