Window Shape
in
Programming Questions
•
2 years ago
I haven't seen this posted before, but sorry if it has. I need to change the shape of the sketch window and have no idea how I would accomplish this. I've looked at
this post in exhibition but haven't been able to reproduce the circular windows it creates. I'm pretty new and what I came up with is probably completely wrong, but from my understanding this should just change the sketch window into a circle... so if someone could help, the help would be greatly appreciated.
Here's my code... pretty bad.
(I had no idea what was needed to be imported so I just kept the stuff that looked like it could do something).
Thanks,
TheGamersHaven
Here's my code... pretty bad.
(I had no idea what was needed to be imported so I just kept the stuff that looked like it could do something).
- import java.awt.*;
- import com.sun.awt.AWTUtilities;
- import java.awt.GraphicsDevice.*; // PC only
- import java.awt.Shape;
- import java.awt.AWTException;
- import java.awt.geom.*;
- int d = 500;
- void setup() {
- size(d,d);
- background(255);
- Shape shape = null;
- shape = new Ellipse2D.Float(0,0,d,d);
- AWTUtilities.setWindowShape(frame, shape);
- }
- void draw() {}
Thanks,
TheGamersHaven
1