vispy.util.gallery_scraper module#

Scraper for sphinx-gallery.

This is used to collect screenshots from the examples when executed via sphinx-gallery. This can be included in any project wanting to take advantage of this by adding the following to your sphinx conf.py:

sphinx_gallery_conf = {
    ...
    'image_scrapers': ('vispy',)
}

The scraper is provided to sphinx-gallery via the vispy._get_sg_image_scraper() function.

class vispy.util.gallery_scraper.FrameGrabber(canvas_obj, frame_grab_list: list[int])#

Bases: object

Helper to grab a series of screenshots from the current Canvas-like object.

collect_frames()#

Show current Canvas and render and collect all frames requested.

on_draw(_)#
save_animation(filename)#
save_frame(filename, frame_index=0)#
class vispy.util.gallery_scraper.VisPyGalleryScraper#

Bases: object

Custom sphinx-gallery scraper to save the current Canvas to an image.

vispy.util.gallery_scraper.get_canvaslike_from_globals(globals_dict)#