displayRegion screenshot

I can’t understand how to use these codes.

API Reference - DisplayRegion

    displayRegion.getScreenshot(PNMImage &image)
    displayRegion.makeScreenshotFilename(string const &prefix = ("screenshot"))
    displayRegion.saveScreenshot(Filename const &filename, string const &image_comment = (""))
    displayRegion.saveScreenshotDefault(string const &prefix = ("screenshot"))

I do not have the faintest idea what to place in the brackets.
Can someone please help me?

Also how do I use random, to place objects in random positions, orientation, and scale? Thanks

Euh, this look a bit like a C/C++ Code and not a python code…

For random, it’s quite simple:

from random import random

For screenshot: calling that would be something like:

But, most probably you would just use base.screenshot().

Thanks very much.

Question pro-rsoft
I did not see anything in the manual on screenshot.
Where can I find other info or codes like the one you gave me?

I think its also used somewhere in the sample programs.
A lot of base functions are documented here:

The API Reference. I have downloaded most of the pages, but I think I should download all. Thanks