This class handles and encapsulates the rendering of Seadragon content.
It also provides support for overlays, which are HTML elements that are
rendered on top of the content.
Currently, the Drawer supports two rendering methods: the first uses
regular <img> elements, while the second uses the HTML 5
<canvas> element. The
rendering method used for a given browser is determined by browser
capability and rendering quality.
All properties are aliased; re-assigning them has no effect, but
modifying them does.
Name and Signature
|
Return Type
|
Description
|
addOverlay(elmt, rect)
|
-
|
Adds the given HTML element as an overlay to the content if it
has not been added before. This overlay will
scale with the content; the element's size will always match the
given Seadragon.Rect,
which must be in normalized coordinates (see
Seadragon.Viewport
for details).
|
addOverlay(elmt, point, placement?)
|
-
|
Adds the given HTML element as an overlay to the content if it
has not been added before. This overlay will not
scale with the content; its size will remain untouched. The
overlay will be placed at the given Seadragon.Point, which must be a
normalized coordinate (see Seadragon.Viewport for details).
An optional Seadragon.OverlayPlacement
value can be given that describes which part of the element is
specifically placed at the given point. If none is given, the
element is placed by its center.
|
updateOverlay(elmt, rect)
|
-
|
Updates the given HTML element overlay to the given
Seadragon.Rect.
The overlay will scale with the content.
|
updateOverlay(elmt, point, placement?)
|
-
|
Updates the given HTML element overlay to the given
Seadragon.Point.
and optionally the given Seadragon.OverlayPlacement.
If no placement is given, the element is placed by its center.
The overlay will not scale with the content.
|
removeOverlay(elmt)
|
-
|
Removes the given HTML element overlay.
|
clearOverlays()
|
-
|
Removes all HTML element overlays.
|