public interface ImageCanvas extends Pannable, Zoomable
ImageDisplay
draws its output.
An image canvas supports two different coordinate systems, and provides a
mechanism for conversion between them. The first is panel
coordinates, which are in pixels onscreen. The second is data
coordinates, which match the linked ImageDisplay
's original
coordinate system.
Modifier and Type | Method and Description |
---|---|
IntCoords |
dataToPanelCoords(RealCoords dataCoords)
Converts the given data coordinates into panel
coordinates.
|
MouseCursor |
getCursor()
Gets the current mouse cursor.
|
ImageDisplay |
getDisplay()
Gets the canvas's display.
|
int |
getViewportHeight()
Gets the current height of the canvas viewport in panel
coordinates.
|
int |
getViewportWidth()
Gets the current width of the canvas viewport in panel
coordinates.
|
boolean |
isInImage(IntCoords point)
Tests whether a given point in the panel falls within the boundaries of the
display space.
|
RealCoords |
panelToDataCoords(IntCoords panelCoords)
Converts the given panel coordinates into data
coordinates.
|
void |
setCursor(MouseCursor cursor)
Sets the mouse to the given
MouseCursor type. |
void |
setViewportSize(int width,
int height)
Sets the dimensions of the viewport in panel coordinates.
|
getPanCenter, getPanOffset, pan, pan, panReset, setPanCenter, setPanCenter
getBestZoomLevel, getInitialScale, getZoomFactor, setInitialScale, setZoom, setZoomAndCenter, setZoomAndCenter, setZoomAtPoint, setZoomAtPoint, zoomIn, zoomIn, zoomIn, zoomOut, zoomOut, zoomOut, zoomToFit, zoomToFit
ImageDisplay getDisplay()
int getViewportWidth()
int getViewportHeight()
void setViewportSize(int width, int height)
boolean isInImage(IntCoords point)
point
- The point to check, in panel coordinates.RealCoords panelToDataCoords(IntCoords panelCoords)
IntCoords dataToPanelCoords(RealCoords dataCoords)
MouseCursor getCursor()
void setCursor(MouseCursor cursor)
MouseCursor
type.Copyright © 2014–2022 ImageJ. All rights reserved.