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

Mobile: ImageView do not rotate about its center

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx1.0
    • Fix Version/s: fx1.1
    • Component/s: javafx
    • Environment:

      Emulator running on Windows XP Prof, JavaFX 1.0.1, 6u10 b33

      Description

      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++;
                  }
              }
          }
      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: