I am trying to write a puzzle using JavaFX partly because someone asked me and partly because I want to give JavaFX. However, I am having difficulty actually cropping the image.
The idea is for the user to provide an image and a program to cut the image into smaller parts. Simple, right? My problem is this: the only way to find the image is to make a copy of the image object and change the visible part of the copy, here is an example:
ImageView imgageView = new ImageView();
imgageView.setImage(originalImage);
Rectangle2D rectangle = new Rectangle2D(0, 0, 50, 50);
To clarify the last line, here is the related element in the API :
public Rectangle2D(double minX,
double minY,
double width,
double height)
Creates a new instance of Rectangle2D.
Parameters:
minX - The x coordinate of the upper-left corner of the Rectangle2D
minY - The y coordinate of the upper-left corner of the Rectangle2D
width - The width of the Rectangle2D
height - The height of the Rectangle2D
, ( ), , 1200 ? ? , . , , , "".
? , , ?