java - Set transparent background of the taken Snapshot -
i use snapshot()
method on shape
object in order convert imageview
, nest label
. problem is, when take snapshot of shape
object closed square field white background. there way make transparent? use code below in order convert given shape
imageview
object:
writableimage snapshot = shape.snapshot(new snapshotparameters(), null); imageview imageview = new imageview(snapshot); label label = new label(); label.setgraphic(imageview); pane.getchildren().add(label);
here go
snapshotparameters parameters = new snapshotparameters(); parameters.setfill(color.transparent); writableimage snapshot = shape.snapshot(parameters, null); ...
Comments
Post a Comment