This is related to javafx, displaying a javafx image in a separate stage, self contained, but with call-backs as in the sample code available on request.
The objective is a working module (stage) used to extract a rectangle from the original image to be used as an icon elsewhere. The rectangle will be chosen separately.
Code is expected to be documented beyond “this binds a variable” and there are some constraints as outlined below.
The code will maintain a Point 2D variable which will hold the rotation point as defined below. The code will maintain two function to convert the image rotation point a stack pane point if visible
1. The function is called with an image average 8k x 6k , and an angle for rotation.
2. The image will be initially displayed scaled at a scale make the image fit within a 600x600 pixel which can be resized, the min zoom is defined as the image as fit in the viewport The image is initially rotated at the angle given.
3. The image should be in an imageview which is added to a a scrollpane and stack pane which is the center of a Borderpane is a stack pane. There will be multiple panes added. The sample code uses a compass rose.
4. Additional panes will be added, but as in the sample code, these are bound to the stack pane.
5. Zoom in/out is on the center scroll button on the mouse. Zoom should adjust the scrollbars as necessary. The scrollbars can be set to always visible.
1. If the Mouse point is on the image, the zoom point is on the mouse point
2. There is a zoom slider on the border pane, When used, the zoom will be around the center of the current image (as already zoomed /rotated ).
3. Zoom is defined as zooming on the mouse pointer. zooming in is always on the mouse pointer in the image. zooming out is cantered on the mouse point until it is no longer feasible to center on the mouse point.
6. The imageview is rotated around the mouse pointer and the coordinates are saved in a Point 2D variable.
7. Pan is done through the scrollpane built-in pan function.
8. Maximum zoom is x4 (but defined by a variable.