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
|
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 |
_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 |
_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` |
Returns:
- Type
- Object
activate()
Activates the overlay.
deactivate()
Deactivates the overlay.