-
Bug
-
Resolution: Fixed
-
P4
-
fx2.0
-
Product: javafx-2.0beta
Platform: windows-i586
Build-Number: 153
Build-ID: 2011-05-10_22-27-35
The following code fragment:
root = new Group();
Rectangle rect = new Rectangle( 10, 10, 100, 100);
rect.setFill( Color.RED);
rect.setStroke(Color.BLACK);
rect.setStrokeWidth(2);
root.getChildren().add( rect);
Line line = new Line( 1, 1, 150, 100);
line.setStroke( Color.BLACK);
line.setStrokeWidth(2);
root.getChildren().add( line);
Scale scale = new Scale( 5, 5);
root.getTransforms().add(scale);
// Create and show the stage
stage.setWidth(800);
stage.setHeight(600);
Scene scene = new Scene(root);
stage.setScene(scene);
stage.setVisible(true);
produces the scene visible in the attached screenshot. Please note that the rectangle's stroke width is, quite correctly, 10px (2 x 5) whereas the line stroke width is only 2px, as if there was no scale transformation at all.
root = new Group();
Rectangle rect = new Rectangle( 10, 10, 100, 100);
rect.setFill( Color.RED);
rect.setStroke(Color.BLACK);
rect.setStrokeWidth(2);
root.getChildren().add( rect);
Line line = new Line( 1, 1, 150, 100);
line.setStroke( Color.BLACK);
line.setStrokeWidth(2);
root.getChildren().add( line);
Scale scale = new Scale( 5, 5);
root.getTransforms().add(scale);
// Create and show the stage
stage.setWidth(800);
stage.setHeight(600);
Scene scene = new Scene(root);
stage.setScene(scene);
stage.setVisible(true);
produces the scene visible in the attached screenshot. Please note that the rectangle's stroke width is, quite correctly, 10px (2 x 5) whereas the line stroke width is only 2px, as if there was no scale transformation at all.