JosephDuchesne
Ex Member
|
PImage, Rect drawing differently, same vars!
Jun 24th, 2006, 7:34pm
Hello, I'm drawing a PImage and a Rect directly to a PGraphics2 object: oot.rect(0,0,w,h); //draw image placeholder oot.image(t, 0, 0, w, h);
and I get the following image: http://www.staronesw.com/temp/Output.jpg
The drawing code is exactly as seen above, and the image size is 1020x1400 (it's not even square!). This bug/problem occurs when I load any image, and it always shows up the same. Why is this image drawing at the wrong size?
Solved! My values were 2.5 and 2.5. These got chopped off to 2.0 and 2.0. Somewhere in the processing code it's doing that, even though the scale is way below zero, thus making the image completely wrong when drawn with the int values. I solved it by putting the following code in: oot.pushMatrix(); oot.scale(.01); oot.rect(0,0,w*100,h*100); //draw image placeholder oot.image(t, 0, 0, w*100, h*100); oot.popMatrix();
Is this a bug?
|