Offscreen PGraphics buffer misbehavior
in
Programming Questions
•
2 years ago
So I have succeded creating the offscreen buffer with the createGraphics() function, drawing to it with the standard plotting functions and displaying it as a PImage object. However, I have noticed a strange behavior of the rendering.
1st strangeness: if I call the smooth() function after the beginDraw(), the resulting image gets smoothed and everything seems fine except for that at the time of actual display, it gets an unwanted offset of something like x+50 and y+50. That is, the image gets this offset by just one "smooth()" function. If I comment it out - all is fine. Does anyone has a clue if it is a bug and if is gonna be fixed?
2nd strangeness: the output picture gets truncated on the bottom and on the right. So instead a picture of, say, 600x500 i get only th first 400x400 portion of it or something like that (i did not measure it yet). I am almost sure that my plotting routines cannot be the reason of this. Is there any known technical reason and a workaround for it?
The two strangesses above are cumulative.
Notice: I cannot post my code here since it is big (I use Eclipse to handle it), there is much unrelated stuff, and sometimes broken incapsulation (due to my present faulty programming style, but I'm trying). Although, I can post parts of it if needed.
Thanks in advance!
1