Jim Brown Active Member Licensed User Longtime User Jul 6, 2014 #1 A great addition to B4J would be support for the JavaFX ColorAdjust class. I could perhaps look at writing a library but I don't really know how to properly implement it. From the JavaFX API - ColorAdjust ColorAdjust colorAdjust = new ColorAdjust(); colorAdjust.setContrast(0.1); colorAdjust.setHue(-0.05); colorAdjust.setBrightness(0.1); colorAdjust.setSaturation(0.2); Image image = new Image("boat.jpg"); ImageView imageView = new ImageView(image); imageView.setFitWidth(200); imageView.setPreserveRatio(true); imageView.setEffect(colorAdjust); Last edited: Jul 6, 2014
A great addition to B4J would be support for the JavaFX ColorAdjust class. I could perhaps look at writing a library but I don't really know how to properly implement it. From the JavaFX API - ColorAdjust ColorAdjust colorAdjust = new ColorAdjust(); colorAdjust.setContrast(0.1); colorAdjust.setHue(-0.05); colorAdjust.setBrightness(0.1); colorAdjust.setSaturation(0.2); Image image = new Image("boat.jpg"); ImageView imageView = new ImageView(image); imageView.setFitWidth(200); imageView.setPreserveRatio(true); imageView.setEffect(colorAdjust);
Erel B4X founder Staff member Licensed User Longtime User Jul 6, 2014 #2 It should be quite simple to access this API with JavaObject. Something like: Code: Copy Dim colorAdjust As JavaObject colorAdjust.InitializeNewInstance("javafx.scene.effect", null) colorAdjust.RunMethod("setContrast", Array(0.1)) ... Dim jiv As JavaObject = ImageView1 jiv.RunMethod("setEffect", Array(colorAdjust)) Last edited: Jul 7, 2014
It should be quite simple to access this API with JavaObject. Something like: Code: Copy Dim colorAdjust As JavaObject colorAdjust.InitializeNewInstance("javafx.scene.effect", null) colorAdjust.RunMethod("setContrast", Array(0.1)) ... Dim jiv As JavaObject = ImageView1 jiv.RunMethod("setEffect", Array(colorAdjust))
Jim Brown Active Member Licensed User Longtime User Jul 6, 2014 #3 Thank you Erel. It might be enough to get me started on a library.
Swissmade Well-Known Member Licensed User Longtime User Oct 18, 2014 #4 Hi all, colorAdjust.InitializeNewInstance("javafx.scene.effect", null) Click to expand... This part I get a error Class not found I there any sample for this. I need some color adjustement. Many thanks for help. Last edited: Oct 18, 2014
Hi all, colorAdjust.InitializeNewInstance("javafx.scene.effect", null) Click to expand... This part I get a error Class not found I there any sample for this. I need some color adjustement. Many thanks for help.
Erel B4X founder Staff member Licensed User Longtime User Oct 19, 2014 #5 It should be javafx.scene.effect.ColorAdjust.
Swissmade Well-Known Member Licensed User Longtime User Oct 19, 2014 #6 Thanks Erel Edit Working Last edited: Oct 19, 2014