Interface ImageRendererOptions

GoJS® Diagramming Components
version 3.0.1
by Northwoods Software®

Hierarchy

Used for the options argument to Diagram.makeImage and Diagram.makeImageData.

Index

Properties

The optional details to pass to the HTMLCanvasElement's toDataURL function. If the type is "image/jpeg" then this can be a number from 0 to 1, inclusive, describing the desired jpeg quality.

The optional return type of the image data. Valid values are "ImageData", "Image", "string", and "blob". The "string" option returns a base64 string representation of the image. The "ImageData" option returns an ImageData object representation of the image. The "Image" option returns an HTMLImageElement using ImageData as the HTMLImageElement.src. The "blob" option requires that the callback property is also defined. The default value is "string", and unrecognized values will return a string.

The optional MIME type of the image. Valid values are typically "image/png" and "image/jpeg". Some browsers allow "image/webp". The default value is "image/png", and unrecognized values will defer to the default.