JVertexView.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:JavaGraph 作者:
/** Creates a diamond shape inscribed in the bounds given in the parameters. */
private Shape createDiamondShape(double x, double y, double width, double height) {
    GeneralPath result = new GeneralPath(Path2D.WIND_NON_ZERO, 5);
    result.moveTo(x + width / 2, y);
    result.lineTo(x + width, y + height / 2);
    result.lineTo(x + width / 2, y + height);
    result.lineTo(x, y + height / 2);
    result.closePath();
    return result;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号