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

Circle with large stroke is drawn wrong in swing and j2d

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx2.0
    • javafx
    • None
    • win 7, presidio build888, directfb on beagleboard, GTK on Linux Desktop

      Run next code snippet with different rendering options.
      EXPECTED: Fully red circle (because stroke is wider then radius)
      OBSERVED for j2d and swing: Red circle with gray fill

      screenshot attached
      -------------------------

      import javafx.lang.FX;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.paint.Color;
      import javafx.scene.shape.Circle;
      import javafx.stage.Stage;

      public class DoCircle {
          public static void main(String[] args) {
              FX.start(new Runnable() {
                  public void run() {
                      Stage stage = new Stage();
                      stage.setTitle(System.getProperty("javafx.toolkit","") + System.getProperty("prism.order",""));
                      stage.setWidth(300);
                      stage.setHeight(300);

                      Circle circle = new Circle(150, 150, 30);
                      circle.setStrokeWidth(80);
                      circle.setFill(Color.GRAY);
                      circle.setStroke(Color.RED);

                      Scene scene = new Scene(new Group(circle));
                      stage.setScene(scene);
                      stage.setVisible(true);
                  }
              });
          }
      }

            Unassigned Unassigned
            sgrinev Sergey Grinev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Imported: