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

Circle with large stroke is drawn wrong in swing and j2d

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: fx2.0
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      win 7, presidio build888, directfb on beagleboard, GTK on Linux Desktop

      Description

      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);
                  }
              });
          }
      }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Imported: