-
Bug
-
Resolution: Fixed
-
P4
-
fx1.0
-
JavaFX 1.0.1 b02, emulator, 6u12 b02
Setting Image.preserveRatio to true do not work on emulator. This works correctly on desktop.
To reproduce, run the below code. If the image is not shown with correct aspect ratio, bug is reproduced.
import javafx.scene.*;
import javafx.stage.*;
import javafx.scene.image.*;
import javafx.scene.input.*;
import javafx.scene.text.*;
var image = Image {
url: "http://cldc.russia.sun.com/monty/html/JFXGraphics/res/DUKE.PNG"
width: 50
preserveRatio: true
};
var imageView: ImageView = ImageView {
image: bind image
x: 20
y: 20
};
Stage {
scene: Scene {
content: imageView
}
}
To reproduce, run the below code. If the image is not shown with correct aspect ratio, bug is reproduced.
import javafx.scene.*;
import javafx.stage.*;
import javafx.scene.image.*;
import javafx.scene.input.*;
import javafx.scene.text.*;
var image = Image {
url: "http://cldc.russia.sun.com/monty/html/JFXGraphics/res/DUKE.PNG"
width: 50
preserveRatio: true
};
var imageView: ImageView = ImageView {
image: bind image
x: 20
y: 20
};
Stage {
scene: Scene {
content: imageView
}
}