java - Partially transparent images in javafx -


i making project in eclipse. have uploaded .png file using 'image view' option.it has transparent areas .i want write code such detects click of user's mouse when on opaque area , take user new window defined me.

this code should work in circumstances.

imageview.addeventfilter(mouseevent.mouse_clicked, e -> {     color color = image.getpixelreader().getcolor(e.getx(),e.gety()));     if(color.getalpha() != 0)     {         //execute code here     } }); 

Comments

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -