本文整理汇总了Java中java.awt.geom.Arc2D.setArcByCenter方法的典型用法代码示例。如果您正苦于以下问题:Java Arc2D.setArcByCenter方法的具体用法?Java Arc2D.setArcByCenter怎么用?Java Arc2D.setArcByCenter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.geom.Arc2D
的用法示例。
在下文中一共展示了Arc2D.setArcByCenter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: TestImageGenerator
import java.awt.geom.Arc2D; //导入方法依赖的package包/类
public TestImageGenerator(double[][] matrix, double[] gain, String[] channelNames, int width, int height) {
this.matrix = matrix;
this.gain = gain;
this.channelNames = channelNames;
this.rand = new Random();
this.sizeC = channelNames.length;
this.width = width;
this.height = height;
this.concentrations = new List[sizeC];
this.signals = new double[sizeC][numCells];
// generate concentrations
for (int s=0; s<sizeC; s++) {
concentrations[s] = new ArrayList<>(numCells);
for (int i=0; i<numCells; i++) {
int x = rand.nextInt((int)(width-cellRadius));
int y = rand.nextInt((int)(height-cellRadius));
Arc2D p = new Arc2D.Double(Arc2D.CHORD);
p.setArcByCenter(x, y, cellRadius, 0d, 360d, Arc2D.CHORD);
concentrations[s].add(p);
double density = (rand.nextGaussian() * 100d) + 100;
signals[s][i] = density;
}
}
}