So lets say I have this;
void setup(){
size(200, 200);
surface.setAlwaysOnTop(true);
}
void draw(){
fill(255);
textSize(35);
text("Hello",50,75);
}
How can I get rid of the window frame and the background behind hello? Just hello showing up on screen?
I tried surface.setVisible(false); but it didn’t work.
And another question if anyone knows: How can I make the program see keyboard strokes outside the program ( like when the program isn’t clicked) ?
Another edit: found how to remove title bar but still don’t know about others
Another another edit: turns out the frame background doesn’t support transparency… f
1 Like
void setup() {
fullScreen();
surface.setSize(200, 200); //Change size here
}
void draw() {
background(0);
ellipse(mouseX, mouseY, 20, 20);
}
2 Likes
Yep, I found that after posting. Thanks anyway!
The frame background can have transparency, at least for the JAVA2D
/ “default” renderer in Processing. Here’s a post the question of which shows code for doing so:
Hello forum
I found a fairly simple way to use processing to draw graphics directly to your screen, to make it seem like your window is transparent or translucent, or that your graphics background has full transparency.
The problem though is user input no longer works
keyPressed() and mousePressed() don’t get called, and mouseX and Y are always 0.
You can use import java.awt.MouseInfo; and MouseInfo.getPointerInfo().getLocation().x to somewhat solve the problem, but…
I had myself used this technique many months ago, and it works nicely! I don’t know if the code in the aforementioned post still works as expected, but feel free to ask me for my old code if it doesn’t.