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

Use Marlin renderer in JavaFX BasicStroke

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 10
    • Component/s: javafx
    • Labels:
      None

      Description

      Fix BasicStroke.createCenteredStrokedShape() to use the Marlin renderer instead of Java Pisces renderer (and its Dasher / Stroker operations):

      import com.sun.openpisces.Dasher;
      import com.sun.openpisces.Stroker;
      import com.sun.prism.impl.shape.OpenPiscesPrismUtils;

      ...

          public Shape createCenteredStrokedShape(Shape s) {
              Path2D p2d = new Path2D(Path2D.WIND_NON_ZERO);
              float lw = (type == TYPE_CENTERED) ? width : width * 2.0f;
              PathConsumer2D pc2d =
                  new Stroker(p2d, lw, cap, join, miterLimit);
              if (dash != null) {
                  pc2d = new Dasher(pc2d, dash, dashPhase);
              }
              OpenPiscesPrismUtils.feedConsumer(s.getPathIterator(null), pc2d);
              return p2d;
          }

        Attachments

          Activity

            People

            • Assignee:
              lbourges Laurent Bourgès
              Reporter:
              lbourges Laurent Bourgès
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: