size() not working on Linux (Ubuntu)
in
Integration and Hardware
•
7 months ago
I'm running a "Hello, World" type sketch on Ubuntu Linux (12.04 LTS). The size() method, invoked as the first statement in my setup() method, does not appear to be working correctly. The size of the output window is set correctly, but the
width and
height variables remain at 100x100, and the drawing area appears to be clipped at 100x100, too (based on other testing).
When I run the same sketch on Windows it works as expected. See attached screen captures. In both cases I'm using Processing 2.0b8.
I'm new to processing, so I might be doing something wrong. If so, please let me know. Otherwise, should I file a bug report?
Here is the sketch:
--snip--
void setup() {
size(480, 320);
noLoop();
}
void draw() {
int centX = width/2;
int centY = height/2;
println( "width, height: " + width +", "+height);
ellipse( centX, centY, 0.8*width, 0.8*height);
}
--snip--
Linux output:
Linux PDE:
Windows output:
Windows PDE:
Thanks for your help.
-David
When I run the same sketch on Windows it works as expected. See attached screen captures. In both cases I'm using Processing 2.0b8.
I'm new to processing, so I might be doing something wrong. If so, please let me know. Otherwise, should I file a bug report?
Here is the sketch:
--snip--
void setup() {
size(480, 320);
noLoop();
}
void draw() {
int centX = width/2;
int centY = height/2;
println( "width, height: " + width +", "+height);
ellipse( centX, centY, 0.8*width, 0.8*height);
}
--snip--
Linux output:
Linux PDE:
Windows output:
Windows PDE:
Thanks for your help.
-David
1