screenshot

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

Version two supplies better functionss and clipping tech.

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

Meta Data
dependencies ()
unused_keys ('title',)
unknown_keys ('files', 'categories')
files ['', 'image-edge-detection.js', 'offscreen.js']
categories ['screenshot']
filepath_exists True
path screenshot
filepath screenshot.js
clean_files ('image-edge-detection.js', 'offscreen.js')

  • ClassDeclaration
    class comments:
    files: image-edge-detection.js offscreen.js categories: screenshot --- Version two supplies better functionss and clipping tech. Add extra methods to the `Scene` to capture screenshots of the canvas.
    "image/jpeg"
    • property

      fileFormat

      = "image/png"
      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • property

      fileQuality

      = .9
      from class_name
      dict_keys(['kind', 'word', 'computed', 'static', 'value', 'type', 'pos'])
    • constructor

      constructor

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

      _stashBlob

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

      blobURL

      (
      blob
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Given a _blob_ object, creaate an object url (a base 64 representation of the blob)
    • method

      revokeURL

      (
      url
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Revoke an object url from memory.
    • method

      toBlob

      (
      callback = undefined
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Call the `canvas.toBlob` function to screenshot the canvas. Provide a callback to override the internal onScreenshot method capture function toBlob(function(blob){})
    • method

      toBlobCropped

      (
      crop , callback
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      let crop = {x: 200, y:300, width: 30, height: 30}
    • method

      onScreenshot

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

      createImgElement

      (
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      generate a new `` with the src as a new blob of the canvas. Append to the body to present.
    • method

      downloadImage

      (
      name = polypoint-screenshot.png
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Perform an image _download_ of the canvas, rendered through toBlob This will push a new file to the client.
    • method

      downloadCroppedImage

      (
      name = polypoint-screenshot.png , background = undefined , borderRadius = 10 , dimensions = undefined
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      grab the placement, and create a new download image with cropping.
    • method

      downloadCroppedImageAlphaComposite

      (
      name = polypoint-screenshot.png , background = undefined , borderRadius = 10 , dimensions = undefined
      )
      from class_name
      dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])
      Draw background
    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 ( canvas , mimeType =image/jpeg , quality =0.85 , crop )
    const canvas = this;