Search in sources :

Example 1 with Polyline2D

use of math.geom2d.polygon.Polyline2D in project Activiti by Activiti.

the class BpmnJsonConverter method createGateway.

private Polyline2D createGateway(GraphicInfo graphicInfo) {
    double middleX = graphicInfo.getX() + (graphicInfo.getWidth() / 2);
    double middleY = graphicInfo.getY() + (graphicInfo.getHeight() / 2);
    Polyline2D gatewayRectangle = new Polyline2D(new Point2D(graphicInfo.getX(), middleY), new Point2D(middleX, graphicInfo.getY()), new Point2D(graphicInfo.getX() + graphicInfo.getWidth(), middleY), new Point2D(middleX, graphicInfo.getY() + graphicInfo.getHeight()), new Point2D(graphicInfo.getX(), middleY));
    return gatewayRectangle;
}
Also used : Polyline2D(math.geom2d.polygon.Polyline2D) Point2D(math.geom2d.Point2D)

Aggregations

Point2D (math.geom2d.Point2D)1 Polyline2D (math.geom2d.polygon.Polyline2D)1