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

Mobile: Image.preserveRatio do not work

XMLWordPrintable

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

            dkuzmin Dmitry Kuzmin (Inactive)
            gramachasunw Girish Ramachandran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: