-
Bug
-
Resolution: Fixed
-
P3
-
fx1.0
-
Emulator running on Windows XP Prof, JavaFX 1.0.1, 6u10 b33
On mobile an ImageView do not rotate around its center, rather it rotates w.r.t its origin. On desktop, rotation happens w.r.t the center by default. Hence, this is a compatibility issue.
To reproduce, run the below code. Click on the image to change its 'rotate' attribute. If the image is seen rotating w.r.t its origin, bug is reproduced.
import javafx.scene.*;
import javafx.stage.*;
import javafx.scene.image.*;
import javafx.scene.input.*;
var rotate: Integer = 0;
Stage {
scene: Scene {
content: ImageView {
x: 40
y: 40
fitWidth: 80
fitHeight: 70
rotate: bind rotate
image: Image {
url: "http://cldc.russia.sun.com/monty/html/JFXGraphics/res/DUKE.PNG"
}
onMouseClicked: function(e: MouseEvent) {
rotate++;
}
}
}
}
To reproduce, run the below code. Click on the image to change its 'rotate' attribute. If the image is seen rotating w.r.t its origin, bug is reproduced.
import javafx.scene.*;
import javafx.stage.*;
import javafx.scene.image.*;
import javafx.scene.input.*;
var rotate: Integer = 0;
Stage {
scene: Scene {
content: ImageView {
x: 40
y: 40
fitWidth: 80
fitHeight: 70
rotate: bind rotate
image: Image {
url: "http://cldc.russia.sun.com/monty/html/JFXGraphics/res/DUKE.PNG"
}
onMouseClicked: function(e: MouseEvent) {
rotate++;
}
}
}
}