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
Post a Comment