How can I get the new position before applying the rotation in javafx?

I had this class but when I print the line.endXProperty () .get () when the low is to apply the property does not change the value

Can how I get the updated value after processing?

   @Override public void start(Stage stage) throws Exception {

          root = new Group(); stage.setScene(new Scene(root)); 

          line = new Line(); line.setStrokeWidth(5.0);

          line.setStroke(Color.BLACK);

          line.setStartX(10.0f);

          line.setStartY(80.0f);

          line.setEndX(10.0f);

          line.setEndY(10.0f);

          System.out.println("line.getEndX()="+line.endXProperty().get());

          rotate = new Rotate(90, 10.0f, 80.0f);

          line.getTransforms().add(rotate); 

          System.out.println("line.getEndX()="+line.endXProperty().get()); 

          root.getChildren().add(line);  stage.show();

     }

You can transform the coordinates by the transformations of the node in this way:

Point2D transformedEnd = line.localToParent(line.getEndX(), line.getEndY());

If you want to turn only by the rotation, you can do this way:

Point2D transformedEnd = rotate.transform(line.getEndX(), line.getEndY());

Tags: Java

Similar Questions

Maybe you are looking for

  • Presario C700: Boot lost password

    I have a HP Presario C700 with a game password. I forgot a password. I've seen other posts where you have provided a code to bypass the password. My generated key is 70029298. Help me to reset the Passport to start?

  • Google does not

    I came across a curious problem try to use Google search. Found a solution. But not sure what caused the problem. When I tried to refine a search (edit the text in the search text box) the browser would not refresh on hitting back or their search but

  • None detected Fax (00:43 dry timeout) with M1319f MFP

    I use a LaserJet M1319f MFP.  I can receive faxes, for example of HP testing service.  However I have several "No fax detected" errors each week.  The duration is always 00:43 seconds.  The firmware is updated, none of these recent changes.  The MFP

  • reinstallazione file da bakup

    EGR. My of ignoranza scusate GIS. HO a problem: ho fatto a bakup knew due DVD UNO Ho REINSTALLATO altro MI says: non Può leggerer. Per favore tell cosa devo fare. Grazie Web Saluti

  • VPN from Site to Site and easy 871W

    I have a problem with the configuration of Site to site and easy both together on the same router 871W Something is working, but not everything. x.x.x.x - address IP WANa.a.a.a - gw for WAN IP addressz.z.z.z - IP address of the VPN Site-to Site192.16