Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8105671

Mobile: ImageView do not rotate about its center

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • fx1.1
    • fx1.0
    • javafx
    • 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++;
                  }
              }
          }
      }

            ailjin Artem Iljin (Inactive)
            gramachasunw Girish Ramachandran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: