hg: openjfx/8u-dev/rt: [SCENEBUILDER] Some classes in FXOM now use LinkedHashMap (in place of HashMap) to preserve FXML declaration order.
Changeset: caa2c16ce66b Author:eric.le.ponner eric.le.pon...@oracle.com Date: 2014-08-26 10:25 +0200 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/caa2c16ce66b [SCENEBUILDER] Some classes in FXOM now use LinkedHashMap (in place of HashMap) to preserve FXML declaration order. This will be useful for DTL-6774. This also avoids extra sorting in FXOMCloner (and FxIdCollector). ! apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMCloner.java ! apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMInstance.java ! apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMIntrinsic.java ! apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMObject.java ! apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FxIdCollector.java
hg: openjfx/8u-dev/rt: [SCENEBUILDER] Ignore transient file
Changeset: 41bbfc2cdc8d Author:yjoan Date: 2014-08-26 11:08 +0200 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/41bbfc2cdc8d [SCENEBUILDER] Ignore transient file ! .hgignore
hg: openjfx/8u-dev/rt: RT-37329 [SplitPane] Cannot set divider position in multiple splitpanes at once on button setOnAction()
Changeset: 0e57456b1327 Author:Martin Sladecek martin.slade...@oracle.com Date: 2014-08-26 11:04 +0200 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/0e57456b1327 RT-37329 [SplitPane] Cannot set divider position in multiple splitpanes at once on button setOnAction() Reviewed by: jgiles ! modules/controls/src/main/java/com/sun/javafx/scene/control/skin/SplitPaneSkin.java
hg: openjfx/8u-dev/rt: [SCENEBUILDER] Improved FXOMCloner class to avoid WMI_WRONG_MAP_ITERATOR warning from FindBugs.
Changeset: e282fa2c4093 Author:eric.le.ponner eric.le.pon...@oracle.com Date: 2014-08-26 11:16 +0200 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/e282fa2c4093 [SCENEBUILDER] Improved FXOMCloner class to avoid WMI_WRONG_MAP_ITERATOR warning from FindBugs. ! apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/fxom/FXOMCloner.java
hg: openjfx/8u-dev/rt: RT-38165 A bound value cannot be set exception should print the name of the property that is causing the problem
Changeset: 44cac66ba3ed Author:Martin Sladecek martin.slade...@oracle.com Date: 2014-08-26 14:23 +0200 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/44cac66ba3ed RT-38165 A bound value cannot be set exception should print the name of the property that is causing the problem ! modules/base/src/main/java/javafx/beans/property/BooleanPropertyBase.java ! modules/base/src/main/java/javafx/beans/property/DoublePropertyBase.java ! modules/base/src/main/java/javafx/beans/property/FloatPropertyBase.java ! modules/base/src/main/java/javafx/beans/property/IntegerPropertyBase.java ! modules/base/src/main/java/javafx/beans/property/ListPropertyBase.java ! modules/base/src/main/java/javafx/beans/property/LongPropertyBase.java ! modules/base/src/main/java/javafx/beans/property/MapPropertyBase.java ! modules/base/src/main/java/javafx/beans/property/ObjectPropertyBase.java ! modules/base/src/main/java/javafx/beans/property/SetPropertyBase.java ! modules/base/src/main/java/javafx/beans/property/StringPropertyBase.java
hg: openjfx/8u-dev/rt: Replace dialog placeholder graphics for RT-38271
Changeset: d820fd5710a5 Author:mchicharro Date: 2014-08-26 15:22 +0100 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/d820fd5710a5 Replace dialog placeholder graphics for RT-38271 ! modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-confirm.png + modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-conf...@2x.png ! modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-error.png + modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-er...@2x.png ! modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-fewer-details.png + modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-fewer-deta...@2x.png ! modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-information.png + modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-informat...@2x.png ! modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-more-details.png + modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-more-deta...@2x.png ! modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-warning.png + modules/controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/dialog-warn...@2x.png
hg: openjfx/8u-dev/rt: [SCENEBUILDER] Fix for DTL-6816: Item chosen from auto-suggest menu is not applied immediately
Changeset: 69f0c8731747 Author:Jerome Cambon Date: 2014-08-26 16:50 +0200 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/69f0c8731747 [SCENEBUILDER] Fix for DTL-6816: Item chosen from auto-suggest menu is not applied immediately ! apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/AutoSuggestEditor.java
[8u] Review request: RT-37884: [WebView] Java Logger settings corrupt webview
Hello, could you please review the fix: https://javafx-jira.kenai.com/browse/RT-37884 Thank you! Anton.
hg: openjfx/8u-dev/rt: RT-37698: Platform.isSupported(MEDIA|WEB) passes when it should not on embedded
Changeset: 507a38bed103 Author:ddhill Date: 2014-08-26 11:57 -0400 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/507a38bed103 RT-37698: Platform.isSupported(MEDIA|WEB) passes when it should not on embedded Reviewed-by: kselle, kcr ! modules/graphics/src/main/java/com/sun/javafx/application/PlatformImpl.java
Displaying pixel-perfect images without blur when zooming
Hi there, i want to display multiple images (layers) inside a scene and want to be able to zoom without having blurry images as you can see in the images in the attachment (on the left you can see very big scaled pixels as i need it and on the right is the blurry JavaFX-Result on which i cannot identify single pixels. i used the zoom pane example from https://stackoverflow.com/questions/16680295/javafx-correct-scaling this is how i initialize my scene: ArrayListImageView listOfImageViews = getImageViews(); //imageviews are created from bufferedimages with: SwingFXUtils.toFXImage(image, null) final Group layerGroup = new Group(listOfImageViews); this.stackPane = new StackPane(); stackPane.getChildren().add(layerGroup); scene = new Scene(stackPane); this.stackPane.getChildren().add(this.scrollPane); this.stackPane.getChildren().add(scrollPane.createZoomPane(listOfImageViews )); this.setScene(scene); and this is how zooming is done: ...//calculate scalefactor from scrolling ... layerGroup .setScaleX(layerGroup .getScaleX() * scaleFactor); layerGroup .setScaleY(layerGroup .getScaleY() * scaleFactor); ... when i zoom in so that i theoreticallly could see single pixels, all i see is a blurry area. (see examples) i know already that that`s JavaFX default behaviour and even if i set setSmooth(false), the antialiasing or precision errors or whatever is causing this, persists. is there perhaps another way? i am even willing to write my own implementation of Imageview if it would help. Can anybody please help me out? if you need more details, please ask :) thanks in advance and greetz, Nico
Re: Displaying pixel-perfect images without blur when zooming
Hi Nico, Is this what you looking for: Image image - the image to scale up int width = (int)image.getWidth(); int height = (int)image.getHeight(); int z = (int)getZoom(); // 2, 4, 8, 16 (I only tested for powers of two) IntBuffer src = IntBuffer.allocate(width * height); WritablePixelFormatIntBuffer pf = PixelFormat.getIntArgbInstance(); image.getPixelReader().getPixels(0, 0, width, height, pf, src, width); int newWidth = width * z; int newHeight = height * z; int[] dst = new int[newWidth * newHeight]; int index = 0; for (int y = 0; y height; y++) { index = y * newWidth * z; for (int x = 0; x width; x++) { int pixel = src.get(); for (int i = 0; i z; i++) { for (int j = 0; j z; j++) { dst[index + i + (newWidth * j)] = pixel; } } index += z; } } WritableImage bigImage = new WritableImage(newWidth, newHeight); bigImage.getPixelWriter().setPixels(0, 0, newWidth, newHeight, pf, dst, 0, newWidth); preview.setImage(bigImage); preview.setFitWidth(newWidth); preview is ImageView where the scale up image is displayed. Felipe On Aug 26, 2014, at 10:00 AM, Nico Krebs | www.mensch-und-maschine.de nicokrebs@googlemail.com wrote: Hi there, i want to display multiple images (layers) inside a scene and want to be able to zoom without having blurry images as you can see in the images in the attachment (on the left you can see very big scaled pixels as i need it and on the right is the blurry JavaFX-Result on which i cannot identify single pixels. i used the zoom pane example from https://stackoverflow.com/questions/16680295/javafx-correct-scaling this is how i initialize my scene: ArrayListImageView listOfImageViews = getImageViews(); //imageviews are created from bufferedimages with: SwingFXUtils.toFXImage(image, null) final Group layerGroup = new Group(listOfImageViews); this.stackPane = new StackPane(); stackPane.getChildren().add(layerGroup); scene = new Scene(stackPane); this.stackPane.getChildren().add(this.scrollPane); this.stackPane.getChildren().add(scrollPane.createZoomPane(listOfImageViews )); this.setScene(scene); and this is how zooming is done: ...//calculate scalefactor from scrolling ... layerGroup .setScaleX(layerGroup .getScaleX() * scaleFactor); layerGroup .setScaleY(layerGroup .getScaleY() * scaleFactor); ... when i zoom in so that i theoreticallly could see single pixels, all i see is a blurry area. (see examples) i know already that that`s JavaFX default behaviour and even if i set setSmooth(false), the antialiasing or precision errors or whatever is causing this, persists. is there perhaps another way? i am even willing to write my own implementation of Imageview if it would help. Can anybody please help me out? if you need more details, please ask :) thanks in advance and greetz, Nico
Re: Displaying pixel-perfect images without blur when zooming
Thanx for that quick response! It is the right direction, but doing this for one image is not enough. when having multiple images, the distances between them must be scaled, too. I will extend your example to scale all nodes and their positions, too. I try it tomorrow and post the result here. Nico Felipe Heidrich mailto:felipe.heidr...@oracle.com 26. August 2014 19:20 Hi Nico, Is this what you looking for: Image image - the image to scale up int width = (int)image.getWidth(); int height = (int)image.getHeight(); int z = (int)getZoom(); // 2, 4, 8, 16 (I only tested for powers of two) IntBuffer src = IntBuffer.allocate(width * height); WritablePixelFormatIntBuffer pf = PixelFormat.getIntArgbInstance(); image.getPixelReader().getPixels(0, 0, width, height, pf, src, width); int newWidth = width * z; int newHeight = height * z; int[] dst = new int[newWidth * newHeight]; int index = 0; for (int y = 0; y height; y++) { index = y * newWidth * z; for (int x = 0; x width; x++) { int pixel = src.get(); for (int i = 0; i z; i++) { for (int j = 0; j z; j++) { dst[index + i + (newWidth * j)] = pixel; } } index += z; } } WritableImage bigImage = new WritableImage(newWidth, newHeight); bigImage.getPixelWriter().setPixels(0, 0, newWidth, newHeight, pf, dst, 0, newWidth); preview.setImage(bigImage); preview.setFitWidth(newWidth); preview is ImageView where the scale up image is displayed. Felipe -- Nico Krebs Michelangelostraße 1 01217 Dresden web: www.mensch-und-maschine.de mobil:0162 / 85 89 667 mail:nicokrebs@googlemail.com skype:k-dottus icq:324 143 104 fax:032 12 - 11 39 77 6 twitter: nico_krebs
hg: openjfx/8u-dev/rt: 2 new changesets
Changeset: 8889a4892b7d Author:mchicharro Date: 2014-08-26 18:29 +0100 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/8889a4892b7d [SCENEBUILDER] Fix for DTL-6830 Auto Suggest Popup has changed appearance ! apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/DoubleAutoSuggestEditor.fxml ! apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/IntegerAutoSuggestEditor.fxml ! apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StringAutoSuggestEditor.fxml Changeset: 6a782ee05c58 Author:mchicharro Date: 2014-08-26 19:29 +0100 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/6a782ee05c58 Merged changes ! .idea/copyright/profiles_settings.xml
hg: openjfx/8u-dev/rt: RT-38185: [Accessibility] Intermittent crash / relaunch on exit on Windows 7 with Narrator
Changeset: 5705e881dc1f Author:Felipe Heidrich felipe.heidr...@oracle.com Date: 2014-08-26 11:34 -0700 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/5705e881dc1f RT-38185: [Accessibility] Intermittent crash / relaunch on exit on Windows 7 with Narrator ! modules/graphics/src/main/native-glass/win/GlassAccessible.cpp ! modules/graphics/src/main/native-glass/win/GlassApplication.cpp ! modules/graphics/src/main/native-glass/win/GlassApplication.h ! modules/graphics/src/main/native-glass/win/Utils.h
Re: [8u] Review request: RT-38290: [WebView] HTML canvas clip() functionality broken
Hi Anton, Does it make sense to add a boolean param to renderLayer() which would tell it if it should dispose the layer after rendering? In order to avoid the splitting. Also, could you please clarify the following. From your comments: 72 // WCBufferedContext might be referenced from a client JS code and thus 73 // couldn't be disposed right after rendering operations on it. However, when it is disposed (will it?) it looks like it will re-render all the layers (WCGraphicsPrismContext.dispose). Is it an expected behavior? Thanks, Anton. On 8/20/14 9:26 PM, anton nashatyrev wrote: Hello, could you please review the fix for https://javafx-jira.kenai.com/browse/RT-38290 ? Thank you! Anton.
hg: openjfx/8u-dev/rt: RT-38391: [CSS] Add support for specifying durations
Changeset: 6efbcb758363 Author:David Grievedavid.gri...@oracle.com Date: 2014-08-26 15:54 -0400 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/6efbcb758363 RT-38391: [CSS] Add support for specifying durations ! apps/toys/Hello/src/main/java/hello/HelloCSS.java ! modules/graphics/src/main/docs/javafx/scene/doc-files/cssref.html ! modules/graphics/src/main/java/com/sun/javafx/css/SizeUnits.java + modules/graphics/src/main/java/com/sun/javafx/css/converters/DurationConverter.java ! modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSLexer.java ! modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java ! modules/graphics/src/main/java/javafx/css/StyleConverter.java ! modules/graphics/src/main/java/javafx/css/StyleablePropertyFactory.java ! modules/graphics/src/test/java/com/sun/javafx/css/SizeTest.java ! modules/graphics/src/test/java/com/sun/javafx/css/parser/CSSLexerTest.java ! modules/graphics/src/test/java/javafx/css/StyleablePropertyFactoryTest.java ! modules/graphics/src/test/java/javafx/css/StyleablePropertyFactory_createMethod_Test.java
CSS: Use none or null?
Just a quick question: Which one is correct, -fx-fill: none; or -fx-fill: null; ? Thanks, Tomas
[8u40] Post-commit review: (RT-38391) [CSS] Add support for specifying durations
Added handling of 's' and 'ms' time units to the CSS parser. Added public static StyleConverter?,Duration getDurationConverter() to javafx.css.StyleConverter Added corresponding createStyleableDurationProperty methods to javafx.css.StyleablePropertyFactory. https://javafx-jira.kenai.com/browse/RT-38391 Here is some sample code. Look for the setting of the in-line style -my-duration from a listener on the slider valueProperty. import javafx.animation.Animation; import javafx.animation.FadeTransition; import javafx.application.Application; import javafx.beans.binding.Bindings; import javafx.beans.property.BooleanProperty; import javafx.beans.property.ObjectProperty; import javafx.beans.property.Property; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.css.CssMetaData; import javafx.css.Styleable; import javafx.css.StyleableProperty; import javafx.css.StyleablePropertyFactory; import javafx.geometry.Insets; import javafx.geometry.Orientation; import javafx.geometry.Pos; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.Slider; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.layout.Region; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; import javafx.scene.shape.SVGPath; import javafx.stage.Stage; import javafx.util.Duration; import java.util.List; public class Main extends Application { private static class TestNode extends Rectangle { public TestNode() { super(100, 100); } StyleablePropertyFactoryTestNode factory = new StyleablePropertyFactory(Rectangle.getClassCssMetaData()); StyleablePropertyDuration myDuration = factory.createStyleableDurationProperty(this, myDuration, -my-duration, (s) - s.myDuration, Duration.millis(1000)); @Override public ListCssMetaData? extends Styleable, ? getCssMetaData() { return factory.getCssMetaData(); } } BooleanProperty fadeIn = new SimpleBooleanProperty(false); @Override public void start(Stage stage) { final BorderPane pane = new BorderPane(); pane.setPadding(new Insets(10, 10, 10, 10)); Slider slider = new Slider(); slider.setPadding(new Insets(5, 5, 5, 10)); slider.setMin(500d); slider.setMax(1500d); slider.setBlockIncrement(50); slider.setValue(1000d); slider.setShowTickLabels(true); slider.setShowTickMarks(true); slider.setSnapToTicks(true); slider.setOrientation(Orientation.VERTICAL); pane.setRight(slider); final TestNode testNode = new TestNode(); slider.valueProperty().addListener(o - testNode.setStyle(-my-duration: + ((PropertyNumber) o).getValue().intValue() + ms;)); final Button fadeButton = new Button(); fadeButton.textProperty().bind(Bindings.when(fadeIn).then(Fade In).otherwise(Fade Out)); fadeButton.setOnAction(e - { Duration duration = testNode.myDuration.getValue(); FadeTransition transition = new FadeTransition(duration, testNode); transition.setFromValue(testNode.getOpacity()); transition.statusProperty().addListener(o - { if (((ReadOnlyObjectPropertyAnimation.Status) o).getValue() == Animation.Status.STOPPED) { fadeButton.setDisable(false); } else { fadeButton.setDisable(true); } }); if (fadeIn.get()) { transition.setToValue(1.0); transition.setByValue(5); transition.setOnFinished(a - fadeIn.set(false)); } else { transition.setToValue(0.1); transition.setByValue(-5); transition.setOnFinished(a - fadeIn.set(true)); } transition.playFromStart(); }); VBox vbox = new VBox(5, testNode, fadeButton); vbox.setAlignment(Pos.CENTER); pane.setCenter(vbox); Label label = new Label(Use slider to adjust duration of the\nFadeTransition, then click the button.); pane.setTop(label); Label status = new Label(); status.textProperty().bind(Bindings.createStringBinding( () - testNode.myDuration.getValue().toString(), (ObjectPropertyDuration) testNode.myDuration )); pane.setBottom(status); BorderPane.setAlignment(label, Pos.CENTER); BorderPane.setAlignment(slider, Pos.CENTER); BorderPane.setAlignment(vbox, Pos.CENTER); BorderPane.setAlignment(status, Pos.BOTTOM_RIGHT); Scene scene = new Scene(pane, 300, 250); stage.setScene(scene);
Re: CSS: Use none or null?
Either one. On 8/26/14, 4:21 PM, Tomas Mikula wrote: Just a quick question: Which one is correct, -fx-fill: none; or -fx-fill: null; ? Thanks, Tomas
hg: openjfx/8u-dev/rt: RT-38187: [a11y] Intermittent NPE running HelloSanity or SceneBuilder with Narrator
Changeset: e68dd7128fdd Author:Felipe Heidrich felipe.heidr...@oracle.com Date: 2014-08-26 13:49 -0700 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/e68dd7128fdd RT-38187: [a11y] Intermittent NPE running HelloSanity or SceneBuilder with Narrator Remove possible NPE in GetSelection() ! modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java
hg: openjfx/8u-dev/rt: RT-38187: [a11y] Intermittent NPE running HelloSanity or SceneBuilder with Narrator
Changeset: 96b05e9b6bd4 Author:Felipe Heidrich felipe.heidr...@oracle.com Date: 2014-08-26 13:56 -0700 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/96b05e9b6bd4 RT-38187: [a11y] Intermittent NPE running HelloSanity or SceneBuilder with Narrator Fix missing isDisposed() checks in GetFocus() and get_SelectionContainer() ! modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java
Re: CSS: Use none or null?
Thanks for the quick answer. Tomas On Tue, Aug 26, 2014 at 10:24 PM, David Grieve david.gri...@oracle.com wrote: Either one. On 8/26/14, 4:21 PM, Tomas Mikula wrote: Just a quick question: Which one is correct, -fx-fill: none; or -fx-fill: null; ? Thanks, Tomas
Re: Displaying pixel-perfect images without blur when zooming
I'm curious. Why setSmooth doesn't work? Also, do I really need to create an image in memory just to render something showing the pixels? On Aug 27, 2014 3:32 AM, Nico Krebs | www.mensch-und-maschine.de nicokrebs@googlemail.com wrote: Thanx for that quick response! It is the right direction, but doing this for one image is not enough. when having multiple images, the distances between them must be scaled, too. I will extend your example to scale all nodes and their positions, too. I try it tomorrow and post the result here. Nico Felipe Heidrich mailto:felipe.heidr...@oracle.com 26. August 2014 19:20 Hi Nico, Is this what you looking for: Image image - the image to scale up int width = (int)image.getWidth(); int height = (int)image.getHeight(); int z = (int)getZoom(); // 2, 4, 8, 16 (I only tested for powers of two) IntBuffer src = IntBuffer.allocate(width * height); WritablePixelFormatIntBuffer pf = PixelFormat.getIntArgbInstance(); image.getPixelReader().getPixels(0, 0, width, height, pf, src, width); int newWidth = width * z; int newHeight = height * z; int[] dst = new int[newWidth * newHeight]; int index = 0; for (int y = 0; y height; y++) { index = y * newWidth * z; for (int x = 0; x width; x++) { int pixel = src.get(); for (int i = 0; i z; i++) { for (int j = 0; j z; j++) { dst[index + i + (newWidth * j)] = pixel; } } index += z; } } WritableImage bigImage = new WritableImage(newWidth, newHeight); bigImage.getPixelWriter().setPixels(0, 0, newWidth, newHeight, pf, dst, 0, newWidth); preview.setImage(bigImage); preview.setFitWidth(newWidth); preview is ImageView where the scale up image is displayed. Felipe -- Nico Krebs Michelangelostraße 1 01217 Dresden web: www.mensch-und-maschine.de mobil:0162 / 85 89 667 mail:nicokrebs@googlemail.com skype:k-dottus icq:324 143 104 fax:032 12 - 11 39 77 6 twitter: nico_krebs
Re: [8u] Review request: RT-38290: [WebView] HTML canvas clip() functionality broken
Hi Anton T, The policy for OpenJFX is that code reviews happen in the associated JIRA: https://wiki.openjdk.java.net/display/OpenJFX/Code+Reviews Thanks for reviewing this code, Steve On 2014-08-26, 3:30 PM, Anton V. Tarasov wrote: Hi Anton, Does it make sense to add a boolean param to renderLayer() which would tell it if it should dispose the layer after rendering? In order to avoid the splitting. Also, could you please clarify the following. From your comments: 72 // WCBufferedContext might be referenced from a client JS code and thus 73 // couldn't be disposed right after rendering operations on it. However, when it is disposed (will it?) it looks like it will re-render all the layers (WCGraphicsPrismContext.dispose). Is it an expected behavior? Thanks, Anton. On 8/20/14 9:26 PM, anton nashatyrev wrote: Hello, could you please review the fix for https://javafx-jira.kenai.com/browse/RT-38290 ? Thank you! Anton.
hg: openjfx/8u-dev/rt: [Accessibility] cosmetic changes
Changeset: e1d0a9e30bec Author:Felipe Heidrich felipe.heidr...@oracle.com Date: 2014-08-26 14:49 -0700 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/e1d0a9e30bec [Accessibility] cosmetic changes ! modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java
Re: Displaying pixel-perfect images without blur when zooming
I'm curious. Why setSmooth doesn't work? I tried setSmooth but it doesn’t work. See the doc: Indicates whether to use a better quality filtering algorithm or a faster”. I expected this be a set for the interpolation algorithm (bilinear, bicubic, nearest neighbor, etc). My case I didn’t want a faster filter, I wanted no filter. Anyway, looking at the code, at the rendering level, NSImageView: // RT-18701: this method does nothing public void setSmooth(boolean s) {} Also, do I really need to create an image in memory just to render something showing the pixels? For a workaround done outside JavaFX I can’t think of any other way. I used this code snippet for a simple testing app, small images. Felipe On Aug 27, 2014 3:32 AM, Nico Krebs | www.mensch-und-maschine.de http://www.mensch-und-maschine.de/ nicokrebs@googlemail.com mailto:nicokrebs@googlemail.com wrote: Thanx for that quick response! It is the right direction, but doing this for one image is not enough. when having multiple images, the distances between them must be scaled, too. I will extend your example to scale all nodes and their positions, too. I try it tomorrow and post the result here. Nico Felipe Heidrich mailto:felipe.heidr...@oracle.com mailto:felipe.heidr...@oracle.com 26. August 2014 19:20 Hi Nico, Is this what you looking for: Image image - the image to scale up int width = (int)image.getWidth(); int height = (int)image.getHeight(); int z = (int)getZoom(); // 2, 4, 8, 16 (I only tested for powers of two) IntBuffer src = IntBuffer.allocate(width * height); WritablePixelFormatIntBuffer pf = PixelFormat.getIntArgbInstance(); image.getPixelReader().getPixels(0, 0, width, height, pf, src, width); int newWidth = width * z; int newHeight = height * z; int[] dst = new int[newWidth * newHeight]; int index = 0; for (int y = 0; y height; y++) { index = y * newWidth * z; for (int x = 0; x width; x++) { int pixel = src.get(); for (int i = 0; i z; i++) { for (int j = 0; j z; j++) { dst[index + i + (newWidth * j)] = pixel; } } index += z; } } WritableImage bigImage = new WritableImage(newWidth, newHeight); bigImage.getPixelWriter().setPixels(0, 0, newWidth, newHeight, pf, dst, 0, newWidth); preview.setImage(bigImage); preview.setFitWidth(newWidth); preview is ImageView where the scale up image is displayed. Felipe -- Nico Krebs Michelangelostraße 1 01217 Dresden web: www.mensch-und-maschine.de http://www.mensch-und-maschine.de/ mobil:0162 / 85 89 667 mail:nicokrebs@googlemail.com mailto:nicokrebs@googlemail.com skype:k-dottus icq:324 143 104 fax:032 12 - 11 39 77 6 twitter: nico_krebs
hg: openjfx/8u-dev/rt: RT-38445: [Accessibility, Windows] Fix text traversal action
Changeset: 4be6763a301a Author:Felipe Heidrich felipe.heidr...@oracle.com Date: 2014-08-26 16:28 -0700 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/4be6763a301a RT-38445: [Accessibility, Windows] Fix text traversal action Need to make sure the range is set everytime get_DocumentRange() is called, fixes CP+Y, CP+B ! modules/graphics/src/main/java/com/sun/glass/ui/win/WinAccessible.java
Re: Displaying pixel-perfect images without blur when zooming
We simply haven't implemented this yet: https://javafx-jira.kenai.com/browse/RT-28629 ...jim On 8/26/14 3:29 PM, Felipe Heidrich wrote: I'm curious. Why setSmooth doesn't work? I tried setSmooth but it doesn’t work. See the doc: Indicates whether to use a better quality filtering algorithm or a faster”. I expected this be a set for the interpolation algorithm (bilinear, bicubic, nearest neighbor, etc). My case I didn’t want a faster filter, I wanted no filter. Anyway, looking at the code, at the rendering level, NSImageView: // RT-18701: this method does nothing public void setSmooth(boolean s) {} Also, do I really need to create an image in memory just to render something showing the pixels? For a workaround done outside JavaFX I can’t think of any other way. I used this code snippet for a simple testing app, small images. Felipe On Aug 27, 2014 3:32 AM, Nico Krebs | www.mensch-und-maschine.de http://www.mensch-und-maschine.de/ nicokrebs@googlemail.com mailto:nicokrebs@googlemail.com wrote: Thanx for that quick response! It is the right direction, but doing this for one image is not enough. when having multiple images, the distances between them must be scaled, too. I will extend your example to scale all nodes and their positions, too. I try it tomorrow and post the result here. Nico Felipe Heidrich mailto:felipe.heidr...@oracle.com mailto:felipe.heidr...@oracle.com 26. August 2014 19:20 Hi Nico, Is this what you looking for: Image image - the image to scale up int width = (int)image.getWidth(); int height = (int)image.getHeight(); int z = (int)getZoom(); // 2, 4, 8, 16 (I only tested for powers of two) IntBuffer src = IntBuffer.allocate(width * height); WritablePixelFormatIntBuffer pf = PixelFormat.getIntArgbInstance(); image.getPixelReader().getPixels(0, 0, width, height, pf, src, width); int newWidth = width * z; int newHeight = height * z; int[] dst = new int[newWidth * newHeight]; int index = 0; for (int y = 0; y height; y++) { index = y * newWidth * z; for (int x = 0; x width; x++) { int pixel = src.get(); for (int i = 0; i z; i++) { for (int j = 0; j z; j++) { dst[index + i + (newWidth * j)] = pixel; } } index += z; } } WritableImage bigImage = new WritableImage(newWidth, newHeight); bigImage.getPixelWriter().setPixels(0, 0, newWidth, newHeight, pf, dst, 0, newWidth); preview.setImage(bigImage); preview.setFitWidth(newWidth); preview is ImageView where the scale up image is displayed. Felipe -- Nico Krebs Michelangelostraße 1 01217 Dresden web: www.mensch-und-maschine.de http://www.mensch-und-maschine.de/ mobil:0162 / 85 89 667 mail:nicokrebs@googlemail.com mailto:nicokrebs@googlemail.com skype:k-dottus icq:324 143 104 fax:032 12 - 11 39 77 6 twitter: nico_krebs
8u40 API review: RT-23822 - need API for LCD font smoothing in Canvas
webrev: http://cr.openjdk.java.net/~flar/RT-23822/webrev.01/ Jira: https://javafx-jira.kenai.com/browse/RT-23822 Includes API unit tests and a graphical test is attached to the Jira issue... ...jim
hg: openjfx/8u-dev/rt: RT-38442: [packager] Java FX Packaging options can cause Windows Packager to fail.
Changeset: e4cfda6bac5a Author:shemnon Date: 2014-08-26 14:28 -0600 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/e4cfda6bac5a RT-38442: [packager] Java FX Packaging options can cause Windows Packager to fail. Summary: regexp needs double backslash, so that means quadruple in the source code. ! build.gradle ! modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java ! modules/fxpackager/src/test/java/com/oracle/tools/packager/windows/WinAppBundlerTest.java ! modules/graphics/src/main/java/com/sun/javafx/css/converters/SizeConverter.java