screenshot-v1

<script src="./point_src/screenshot-v1"></script>

Add extra methods to the Scene to capture screenshots of the canvas.

stage = (new Stage()).go()
// creates new image
stage.screenshot.toNewImage()

Download a jpg file:

stage = new Stage
stage.screenshot.downloadImage("my-filename.jpg")

Or spawn a link:

stage.screenshot.asDownloadLink()
// Click the newly DOM inserted link
Meta Data
filepath_exists True
path screenshot-v1
filepath screenshot-v1.js
clean_files ()

  • ClassDeclaration
    class comments:
    Add extra methods to the `Scene` to capture screenshots of the canvas. stage = (new Stage()).go() // creates new image stage.screenshot.toNewImage() Download a jpg file: stage = new Stage stage.screenshot.downloadImage("my-filename.jpg") Or spawn a link: stage.screenshot.asDownloadLink() // Click the newly DOM inserted link
    optional, but you can give the file a name
    • constructor

      constructor

      (
      stage
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      toBlob

      (
      callback
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      downloadImage

      (
      name = my-file-name.jpg
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      optional, but you can give the file a name
    • method

      _stashBlob

      (
      uriBlob
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      toNewImage

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    • method

      asDownloadLink

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
    dict_keys(['kind', 'word', 'parentName', 'type', 'body', 'comments', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])
  • VariableDeclaration
    const

    asObject

    =
    function ( mimeType =image/jpeg , quality =0.85 )
  • VariableDeclaration
    const

    asObjectWithCrop

    =
    function ( mimeType =image/jpeg , quality =0.85 , crop )
  • ExpressionStatement

    :

    dict_keys(['type', 'expression', 'pos'])