java - How can you crop an image to pieces in javafx in order to create a game puzzle with tiles? -


i trying project javafx can't create figures puzzle game tiles, in order push them click of button. how can image cropped , saved individual tile ?

the imageview class used display image. has viewport property represents portion of image viewing. can create multiple image views same image, each different viewport: can add image views pane of kind, register mouse handlers on them, etc.

if need store each piece individual image, can snapshot image view create new image it. you'll find don't need this, however.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -