本文整理匯總了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;
}
}
}