hi milc,
if you use OPENGL you can size your sketch with your screen dimensions, quit the java gray frame and location the sketch in the coordinates that you want.
example with OPENGL:
Quote:import processing.opengl.*;
void setup() {
background(0);
size(1024, 768,OPENGL);
frame.setLocation(100,100);
//frame.setLocation(1280,768)/ /you can put in the other screen
}
void draw() {
stroke(random(255));
strokeWeight(15);
float posy = random(height);
line(0, posy, width,posy);
}
public void init() {
setBackground(Color.black);
frame.removeNotify();
frame.setUndecorated(true);
frame.addNotify();
super.init();
}
P2D or P3D mode:
Quote:void setup() {
background(0);
size(1024, 768);
}
void draw() {
frame.setLocation(100,100);
//frame.setLocation(1280,768)/ /you can put in the other screen
stroke(random(255));
strokeWeight(15);
float posy = random(height);
line(0, posy, width,posy);
}
public void init() {
setBackground(Color.black);
frame.removeNotify();
frame.setUndecorated(true);
frame.addNotify();
super.init();
}
using screen.width, screen.height
Quote:void setup() {
background(0);
size(screen.width, screen.height);
frame.setLocation(0,0);
}
void draw() {
stroke(random(255));
strokeWeight(15);
float posy = random(height);
line(0, posy, width,posy);
}
public void init() {
setBackground(Color.black);
frame.removeNotify();
frame.setUndecorated(true);
frame.addNotify();
super.init();
}
best Regards
alba