Search in sources :

Example 1 with Arrow

use of com.ait.lienzo.client.core.shape.Arrow in project kie-wb-common by kiegroup.

the class ConnectorGlyphLienzoRenderer method render.

@Override
public Group render(final ConnectorGlyph glyph, final double width, final double height) {
    final Group group = new Group();
    final Arrow arrow = new Arrow(new Point2D(STROKE_SIZE, height), new Point2D(width, STROKE_SIZE), 5, 10, 45, 45, ArrowType.AT_END).setStrokeWidth(STROKE_SIZE).setFillColor(glyph.getColor()).setStrokeColor(glyph.getColor()).setDraggable(true);
    group.add(arrow);
    scaleTo(group, width - arrow.getStrokeWidth(), height - arrow.getStrokeWidth());
    return group;
}
Also used : Arrow(com.ait.lienzo.client.core.shape.Arrow) Group(com.ait.lienzo.client.core.shape.Group) Point2D(com.ait.lienzo.client.core.types.Point2D)

Aggregations

Arrow (com.ait.lienzo.client.core.shape.Arrow)1 Group (com.ait.lienzo.client.core.shape.Group)1 Point2D (com.ait.lienzo.client.core.types.Point2D)1