org.gephi.graph.api.Edge.setAlpha()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(159)

本文整理了Java中org.gephi.graph.api.Edge.setAlpha()方法的一些代码示例,展示了Edge.setAlpha()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Edge.setAlpha()方法的具体详情如下:
包路径:org.gephi.graph.api.Edge
类名称:Edge
方法名:setAlpha

Edge.setAlpha介绍

暂无

代码示例

代码示例来源:origin: org.gephi/tools-plugin

public void setEdgeColor(Color c) {
  if (c != null) {
    edge.setR(c.getRed() / 255f);
    edge.setG(c.getGreen() / 255f);
    edge.setB(c.getBlue() / 255f);
    edge.setAlpha(c.getAlpha() / 255f);
  }
}

代码示例来源:origin: org.gephi/tools-plugin

public void setEdgesColor(Color c) {
  if (c != null) {
    edgesColor = c;
    for (Edge edge : edges) {
      edge.setR(c.getRed() / 255f);
      edge.setG(c.getGreen() / 255f);
      edge.setB(c.getBlue() / 255f);
      edge.setAlpha(c.getAlpha() / 255f);
    }
  }
}

代码示例来源:origin: org.gephi/graph-api

edge.setG(g);
edge.setB(b);
edge.setAlpha(alpha);

代码示例来源:origin: org.gephi/visualization

@Override
  public void actionPerformed(ActionEvent evt) {
    color = resetColorButton.getColor();
    GraphController gc = Lookup.getDefault().lookup(GraphController.class);
    GraphModel gm = gc.getGraphModel();
    Graph graph = gm.getGraphVisible();
    for (Node n : graph.getNodes()) {
      n.setR(color.getRed() / 255f);
      n.setG(color.getGreen() / 255f);
      n.setB(color.getBlue() / 255f);
      n.setAlpha(1f);
    }
    for (Edge e : graph.getEdges()) {
      e.setR(color.getRed() / 255f);
      e.setG(color.getGreen() / 255f);
      e.setB(color.getBlue() / 255f);
      e.setAlpha(0f);
    }
  }
});

相关文章