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

[Text] Rendering stroked text with StrokeType of inner or outer is very slow

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 8, 9
    • javafx
    • Eclipse Luna on Win 7

      While I want use setStrokeType() to set text border Outside or Inside, the program become irresponsive. In my case, after setting one
      of label text border as Outside using setStrokeType(), the program can still running , but slowly. If I add another setStrokeType(), it becomes irresponsive.
      here's my code:
      #label{
          -fx-font:25 Arial;
          -fx-font-weight:900;
          -fx-fill: white;
          -fx-stroke: #989898;
          -fx-stroke-width: 1;
          -fx-stroke-type:outside;
          -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.45), 2, 0, 0, 1);
      }



      public class Main extends Application {

          @Override
          public void start(Stage primaryStage) {
               StackPane root = new StackPane();
               Scene scene = new Scene(root, 856, 290);
               primaryStage.setResizable(false);
               root.setId("pane");
               scene.getStylesheets().add("./application/application.css");
               CheckBox check_1 = new CheckBox("Check two");
               check_1.getStyleClass().add("check");
               CheckBox check_2 = new CheckBox("Check one");
               check_2.getStyleClass().add("check");

               Text t= new Text("TEST TEST TEST TEST");
               t.setId("label");
               root.getChildren().addAll(check_1,check_2,t);

               primaryStage.setTitle("Hello world");
               primaryStage.setScene(scene);
               primaryStage.show();
          }

          public static void main(String[] args) {
              try
              {
                  launch(args);
               }
               catch (Exception e)
               {
                  System.out.println(e.toString());
               }
           }
       }

       

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Imported: