本文整理了Java中com.mxgraph.view.mxGraph.getBoundingBoxFromGeometry()
方法的一些代码示例,展示了mxGraph.getBoundingBoxFromGeometry()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。mxGraph.getBoundingBoxFromGeometry()
方法的具体详情如下:
包路径:com.mxgraph.view.mxGraph
类名称:mxGraph
方法名:getBoundingBoxFromGeometry
[英]Returns the bounding box for the geometries of the vertices in the given array of cells.
[中]返回给定单元格数组中顶点几何图形的边界框。
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
/**
* Returns the bounds to be used for the given group and children. This
* implementation computes the bounding box of the geometries of all
* vertices in the given children array. Edges are ignored. If the group
* cell is a swimlane the title region is added to the bounds.
*/
public mxRectangle getBoundsForGroup(Object group, Object[] children,
double border)
{
mxRectangle result = getBoundingBoxFromGeometry(children);
if (result != null)
{
if (isSwimlane(group))
{
mxRectangle size = getStartSize(group);
result.setX(result.getX() - size.getWidth());
result.setY(result.getY() - size.getHeight());
result.setWidth(result.getWidth() + size.getWidth());
result.setHeight(result.getHeight() + size.getHeight());
}
// Adds the border
result.setX(result.getX() - border);
result.setY(result.getY() - border);
result.setWidth(result.getWidth() + 2 * border);
result.setHeight(result.getHeight() + 2 * border);
}
return result;
}
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
/**
* Returns the bounds to be used for the given group and children. This
* implementation computes the bounding box of the geometries of all
* vertices in the given children array. Edges are ignored. If the group
* cell is a swimlane the title region is added to the bounds.
*/
public mxRectangle getBoundsForGroup(Object group, Object[] children,
double border)
{
mxRectangle result = getBoundingBoxFromGeometry(children);
if (result != null)
{
if (isSwimlane(group))
{
mxRectangle size = getStartSize(group);
result.setX(result.getX() - size.getWidth());
result.setY(result.getY() - size.getHeight());
result.setWidth(result.getWidth() + size.getWidth());
result.setHeight(result.getHeight() + size.getHeight());
}
// Adds the border
result.setX(result.getX() - border);
result.setY(result.getY() - border);
result.setWidth(result.getWidth() + 2 * border);
result.setHeight(result.getHeight() + 2 * border);
}
return result;
}
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
mxRectangle bounds = graph.getBoundingBoxFromGeometry(children);
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
mxRectangle bounds = graph.getBoundingBoxFromGeometry(children);
代码示例来源:origin: com.github.vlsi.mxgraph/jgraphx
mxRectangle childBounds = getBoundingBoxFromGeometry(children);
代码示例来源:origin: org.tinyjee.jgraphx/jgraphx
mxRectangle childBounds = getBoundingBoxFromGeometry(children);
内容来源于网络,如有侵权,请联系作者删除!