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

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.


Show current Canvas and render and collect all frames requested.

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.