Class: ScreenshotOverlay

ScreenshotOverlay(viewer, optionsopt)

new ScreenshotOverlay(viewer, optionsopt)

Creates an instance of the ScreenshotOverlay.
Parameters:
Name Type Attributes Description
viewer OpenSeadragon.Viewer The OpenSeadragon viewer object.
options Object <optional>
Properties
Name Type Attributes Default Description
downloadMessage String <optional>
A message to display in the download window
registerWithConfig boolean <optional>
true Set false to suppress auto-registration with ConfigurationWidget
Source:

Methods

_resizeRegion(newScreenW, newScreenH)

Scale the current region's viewportRect proportionally based on new screen-axis pixel dimensions, keeping the center and rotation fixed.
Parameters:
Name Type Description
newScreenW number
newScreenH number
Source:

_setRegion(region)

Store a ScreenshotRegion and update the dialog UI to reflect it. This is the single entry point for all code paths that establish or modify the selected screenshot region.
Parameters:
Name Type Description
region Object
Source:

_viewerElementRectToRegion(viewerElementRect) → {Object}

Convert a viewer-element-space rectangle into a ScreenshotRegion. The input rect may carry a `degrees` property (e.g. from OSD's fromSummits); its actual corners (honoring degrees) are used for screen-axis measurements.
Parameters:
Name Type Description
viewerElementRect OpenSeadragon.Rect | Object `OpenSeadragon.Rect` or plain object with `x`, `y`, `width`, `height`, and optional `degrees`
Source:
Returns:
Type
Object

activate()

Activates the overlay.
Source:

deactivate()

Deactivates the overlay.
Source: