public interface Zoomable
ImageCanvas
.Modifier and Type | Method and Description |
---|---|
double |
getBestZoomLevel(double fractionalScale)
Gets the closest step-wise zoom factor below the given scale.
|
double |
getInitialScale()
Gets the scale to use when reverting after zooming.
|
double |
getZoomFactor()
Gets the current zoom level.
|
void |
setInitialScale(double zoomFactor)
Sets the scale to use when reverting after zooming.
|
void |
setZoom(double factor)
Zooms to the given scale factor, without changing the viewport's center.
|
void |
setZoomAndCenter(double factor)
Zooms to the given scale factor, recentering the viewport at the center of
the data space.
|
void |
setZoomAndCenter(double factor,
RealCoords center)
Zooms to the given scale factor, recentering the viewport at the specified
data coordinates.
|
void |
setZoomAtPoint(double factor,
IntCoords pos)
Zooms to the given scale factor, such that the specified position in
panel coordinates remains at the same place in the viewport.
|
void |
setZoomAtPoint(double factor,
RealCoords pos)
Zooms to the given scale factor, such that the specified position in
data coordinates remains at the same place in the viewport.
|
void |
zoomIn()
Zooms in by the default amount, without changing the viewport's center.
|
void |
zoomIn(IntCoords pos)
Zooms in by the default amount, such that the specified position in
panel coordinates remains at the same place in the viewport.
|
void |
zoomIn(RealCoords pos)
Zooms in by the default amount, such that the specified position in
data coordinates remains at the same place in the viewport.
|
void |
zoomOut()
Zooms out by the default amount, without changing the viewport's center.
|
void |
zoomOut(IntCoords pos)
Zooms out by the default amount, such that the specified position in
panel coordinates remains at the same place in the viewport.
|
void |
zoomOut(RealCoords pos)
Zooms out by the default amount, such that the specified position in
data coordinates remains at the same place in the viewport.
|
void |
zoomToFit(IntRect viewportBox)
Zooms the viewport to fit the given bounding box in panel
coordinates.
|
void |
zoomToFit(RealRect viewportBox)
Zoom the viewport to fit the given bounding box in data
coordinates.
|
void setZoom(double factor)
factor
- The new scale factor.void setZoomAndCenter(double factor)
factor
- The new scale factor.void setZoomAndCenter(double factor, RealCoords center)
factor
- The new scale factor.center
- Absolute coordinates, in data coordinate space.void setZoomAtPoint(double factor, RealCoords pos)
This is useful for repeatedly zooming at a chosen point in the data.
factor
- The new scale factor.pos
- The data coordinates to keep in the same place within
the viewport.void setZoomAtPoint(double factor, IntCoords pos)
This is useful for repeatedly zooming at a clicked point.
factor
- The new scale factor.pos
- The panel coordinates to keep in the same place within
the viewport.void zoomIn()
void zoomIn(RealCoords pos)
pos
- The data coordinates to keep in the same place within
the viewport.void zoomIn(IntCoords pos)
pos
- The panel coordinates to keep in the same place within
the viewport.void zoomOut()
void zoomOut(RealCoords pos)
pos
- The data coordinates to keep in the same place within
the viewport.void zoomOut(IntCoords pos)
pos
- The panel coordinates to keep in the same place within
the viewport.void zoomToFit(RealRect viewportBox)
viewportBox
- The viewport bounding box, in data coordinates.void zoomToFit(IntRect viewportBox)
viewportBox
- The viewport bounding box, in panel
coordinates.double getZoomFactor()
double getInitialScale()
void setInitialScale(double zoomFactor)
double getBestZoomLevel(double fractionalScale)
Copyright © 2014–2022 ImageJ. All rights reserved.