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

StrokeDashArray length affected by LineCapProperty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • emb-8u26, 8u20
    • javafx
    • None

      I would have expected that the result of a dash of 30,30 would be a series of equal sized dashs and spaces.
      The result looks more like 30 dash, 15 space repeated.
              Line l3 = new Line(0, y, width, y);
              l3.setStroke(Color.BLACK);
              l3.setStrokeWidth(10);
              l3.getStrokeDashArray().setAll(30.0, 30.0);
      unless I set:
              l3.strokeLineCapProperty().setValue(StrokeLineCap.BUTT);
      in which case I do get equal spacing.

      My expectation is that the should only affect the rendering of the end of the line and not the stroke pace in the middle.

            flar Jim Graham
            ddhill David Hill (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: