/** * Sets the dash array with individual dash lengths. * * @param dash length of dash * @param dashes if specified, length of remaining dashes * @return this Line */ public T setDashArray(final double dash, final double... dashes) { getAttributes().setDashArray(new DashArray(dash, dashes)); return cast(); }
/** * Sets the dash array with individual dash lengths. * * @param dash length of dash * @param dashes if specified, length of remaining dashes * @return this Line */ public T setDashArray(final double dash, final double... dashes) { getAttributes().setDashArray(new DashArray(dash, dashes)); return cast(); }
/** * Sets the dash array with individual dash lengths. * * @param dash length of dash * @param dashes if specified, length of remaining dashes * @return this Line */ public T setDashArray(final double dash, final double... dashes) { getAttributes().setDashArray(new DashArray(dash, dashes)); return cast(); }
public final void setLineDash(double[] dashes) { if ((null != dashes) && (dashes.length > 0)) { DashArray d = new DashArray(); for (int i = 0; i < dashes.length; i++) { d.push(dashes[i]); } setLineDash(d.getJSO()); } }
/** * Sets the dash array with individual dash lengths. * * @param dash length of dash * @param dashes if specified, length of remaining dashes * @return this Line */ public T setDashArray(final double dash, final double... dashes) { getAttributes().setDashArray(new DashArray(dash, dashes)); return cast(); }
private static Object[] createLine(final double x1, final double y1, final double x2, final double y2) { final MultiPath head = new MultiPath(); final MultiPath tail = new MultiPath(); final DirectionalLine line = new DirectionalLine(x1, y1, x2, y2); line.setDashArray(new DashArray(2, 6)); line.setDraggable(true); line.setSelectionStrokeOffset(SELECTION_OFFSET); line.setHeadOffset(head.getBoundingBox().getHeight()); line.setTailOffset(tail.getBoundingBox().getHeight()); final MultiPathDecorator headDecorator = new MultiPathDecorator(head); final MultiPathDecorator tailDecorator = new MultiPathDecorator(tail); return new Object[]{line, headDecorator, tailDecorator}; } }
private static Object[] createLine(final double x1, final double y1, final double x2, final double y2) { final MultiPath head = new MultiPath(); final MultiPath tail = new MultiPath() .M(DECORATOR_RADIUS, -DECORATOR_RADIUS) .circle(DECORATOR_RADIUS) .setFillColor(ColorName.BLACK) .setFillAlpha(1); final DirectionalLine line = new DirectionalLine(x1, y1, x2, y2); line.setDashArray(new DashArray(4, 4)); line.setDraggable(true); line.setSelectionStrokeOffset(SELECTION_OFFSET); line.setHeadOffset(head.getBoundingBox().getHeight()); line.setTailOffset(tail.getBoundingBox().getHeight()); final MultiPathDecorator headDecorator = new MultiPathDecorator(head); final MultiPathDecorator tailDecorator = new MultiPathDecorator(tail); return new Object[]{line, headDecorator, tailDecorator}; } }
private static Object[] createLine(final double x1, final double y1, final double x2, final double y2) { final MultiPath head = new MultiPath(); final MultiPath tail = new MultiPath() .M(0, DECORATOR_HEIGHT) .L(DECORATOR_WIDTH / 2, 0) .L(DECORATOR_WIDTH, DECORATOR_HEIGHT) .setFillColor(ColorName.BLACK) .setFillAlpha(1); final DirectionalLine line = new DirectionalLine(x1, y1, x2, y2); line.setDashArray(new DashArray(4, 4)); line.setDraggable(true); line.setSelectionStrokeOffset(SELECTION_OFFSET); line.setHeadOffset(head.getBoundingBox().getHeight()); line.setTailOffset(tail.getBoundingBox().getHeight()); final MultiPathDecorator headDecorator = new MultiPathDecorator(head); final MultiPathDecorator tailDecorator = new MultiPathDecorator(tail); return new Object[]{line, headDecorator, tailDecorator}; } }
final DashArray dashes = new DashArray();
DashArray dashes = new DashArray();
context.setLineDash(new DashArray(5, 5));
context.setLineDash(new DashArray(5, 5));
context.setLineDash(new DashArray(5, 5));
context.setLineDash(new DashArray(5, 5));