Why get() does not take 0 parameters in JavaScript ProcessingJS?


According to the ProcessingJS documentation, get(); should return an image of the entire canvas.

On Khan Academy, get(); returns OhNoes with a confusing error message, saying that get takes 2, 3, 4 or 5 parameters.



get(0, 0, width, height); returns an image of the entire canvas.

Note: This article is based on a discussion about the get(); function found here in the Help Center. The discussion also demonstrates an example where the get() method does take 0 parameters as expected.

Exception: A user created PGraphics object permits executing the get() method directly on that object with no arguments.


Last updated October 19, 2017

Internal ID: 416312359665380

Was this article helpful?
4 out of 10 found this helpful
Have more questions? Submit a request