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])[source]

Bases: object

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

collect_frames()[source]

Show current Canvas and render and collect all frames requested.

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

Bases: object

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