本文整理了Java中java.awt.Graphics2D.fillArc()
方法的一些代码示例,展示了Graphics2D.fillArc()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graphics2D.fillArc()
方法的具体详情如下:
包路径:java.awt.Graphics2D
类名称:Graphics2D
方法名:fillArc
暂无
代码示例来源:origin: Dreampie/Resty
int hInt = random.nextInt(8);
graphics.fillArc(xInt, yInt, wInt, hInt, sAngleInt, eAngleInt);
代码示例来源:origin: jphp-group/jphp
@Signature
public void arc(int x, int y, int width, int height, int startAngle, int arcAngle, DrawOptions options) {
applyOptions(options);
if (options.isOutline()) {
gc.drawArc(x, y, width, height, startAngle, arcAngle);
} else {
gc.fillArc(x, y, width, height, startAngle, arcAngle);
}
}
代码示例来源:origin: apache/geode
path.lineTo(endX - ARROW_WIDTH, y + ARROW_WIDTH);
g.draw(path);
g.fillArc(startX, y - CIRCLE_WIDTH / 2, CIRCLE_WIDTH, CIRCLE_WIDTH, 0, 360);
g.drawString(label, startX + LABEL_OFFSET, y - LABEL_OFFSET);
} else {
g.draw(path);
int labelWidth = g.getFontMetrics().stringWidth(label);
g.fillArc(startX - CIRCLE_WIDTH / 2, y - CIRCLE_WIDTH / 2, CIRCLE_WIDTH, CIRCLE_WIDTH, 0,
360);
g.drawString(label, startX - LABEL_OFFSET - labelWidth, y - LABEL_OFFSET);
代码示例来源:origin: kiegroup/optaplanner
int circleY = y + 5;
g.drawOval(circleX, circleY, TIME_WINDOW_DIAMETER, TIME_WINDOW_DIAMETER);
g.fillArc(circleX, circleY, TIME_WINDOW_DIAMETER, TIME_WINDOW_DIAMETER,
90 - calculateTimeWindowDegree(timeWindowedCustomer.getReadyTime()),
calculateTimeWindowDegree(timeWindowedCustomer.getReadyTime())
代码示例来源:origin: apache/pdfbox
@Override
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
{
groupG2D.fillArc(x, y, width, height, startAngle, arcAngle);
alphaG2D.fillArc(x, y, width, height, startAngle, arcAngle);
}
代码示例来源:origin: geotools/geotools
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) {
delegate.fillArc(x, y, width, height, startAngle, arcAngle);
}
代码示例来源:origin: magefree/mage
void drawPie(Graphics2D g, Rectangle area, Slice[] slices) {
double total = 0.0D;
for (int i = 0; i < slices.length; i++) {
total += slices[i].value;
}
if (total == 0.0D) {
return; //there are no slices or no slices with a value > 0, stop here
}
double curValue = 0.0D;
int startAngle = 0;
int lastAngle = 0;
for (int i = 0; i < slices.length; i++) {
startAngle = lastAngle;
int arcAngle = (int) (slices[i].value * 360 / total);
g.setColor(slices[i].color);
g.fillArc(area.x, area.y, area.width - 20, area.height - 20, startAngle, arcAngle);
curValue += slices[i].value;
lastAngle += arcAngle;
}
}
}
代码示例来源:origin: magefree/mage
protected int drawTransformationCircle(Graphics2D g, Paint borderPaint) {
int transformCircleOffset = 0;
if (isTransformCard()) {
transformCircleOffset = boxHeight - contentInset;
g.setPaint(borderPaint);
g.drawOval(borderWidth, totalContentInset, boxHeight - 1, boxHeight - 1);
g.setColor(Color.black);
g.fillOval(borderWidth + 1, totalContentInset + 1, boxHeight - 2, boxHeight - 2);
g.setColor(Color.white);
if (isTransformed) {
g.fillArc(borderWidth + 3, totalContentInset + 3, boxHeight - 6, boxHeight - 6, 90, 270);
g.setColor(Color.black);
g.fillArc(borderWidth + 3 + 3, totalContentInset + 3, boxHeight - 6 - 3, boxHeight - 6, 90, 270);
} else {
g.fillOval(borderWidth + 3, totalContentInset + 3, boxHeight - 6, boxHeight - 6);
}
}
return transformCircleOffset;
}
代码示例来源:origin: geotools/geotools
circleCenterX - radius, circleCenterY - radius, radius * 2, radius * 2);
imageGraphic.setColor(wedgeColor);
imageGraphic.fillArc(
circleCenterX - radius,
circleCenterY - radius,
代码示例来源:origin: org.apache.pdfbox/pdfbox
@Override
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
{
groupG2D.fillArc(x, y, width, height, startAngle, arcAngle);
alphaG2D.fillArc(x, y, width, height, startAngle, arcAngle);
}
代码示例来源:origin: com.harium.etyl/etyl
/**
* @param x
* @param y
* @param w
* @param h
* @param startAngle
* @param arcAngle
*/
public void fillArc(int x, int y, int w, int h, int startAngle, int arcAngle) {
screen.fillArc(x, y, w, h, startAngle, arcAngle);
}
代码示例来源:origin: com.samskivert/samskivert
@Override
public void fillArc (int x, int y, int w, int h, int a, int b)
{
_copy.fillArc(x, y, w, h, a, b);
_primary.fillArc(x, y, w, h, a, b);
}
代码示例来源:origin: com.harium/etyl
/**
*
* @param x
* @param y
* @param w
* @param h
* @param startAngle
* @param arcAngle
*/
public void fillArc(int x, int y, int w, int h, int startAngle, int arcAngle) {
screen.fillArc(x, y, w, h, startAngle, arcAngle);
}
代码示例来源:origin: stackoverflow.com
public void draw(Graphics graphic) {
Graphics2D graphic2D = (Graphics2D) graphic;
graphic2D.fillArc(0, 0, 50, 50, 0, 45);
graphic2D.fillArc(0, 0, 50, 50, 135, 45);
}
代码示例来源:origin: RaiMan/SikuliX2
if (SX.isNotNull(symbol.getFillColor())) {
g2d.setColor(symbol.getFillColor());
g2d.fillArc(topLeft.x + stroke, topLeft.y + stroke,
symbol.w - 2 * stroke, symbol.h - 2 * stroke, 0, 360);
代码示例来源:origin: com.metsci.glimpse/glimpse-core-examples
@Override
public void drawImage( Graphics2D g, int width, int height )
{
g.setColor( Color.CYAN );
g.fillArc( 0, 0, width, height, 0, 360 );
}
} );
代码示例来源:origin: org.scijava/j3dcore
@Override
public final void fillArc(int x, int y, int width, int height,
int startAngle, int arcAngle) {
// XXXX: call validate with bounding box of primitive
validate();
offScreenGraphics2D.fillArc(x, y, width, height, startAngle, arcAngle);
}
代码示例来源:origin: opencollab/jlatexmath
private static void drawCircle(Graphics2D g2, float x, float y) {
g2.setColor(blue);
g2.translate(x, y);
g2.fillArc(0, 0, 8, 8, 0, 360);
g2.setColor(Color.BLACK);
g2.drawArc(0, 0, 8, 8, 0, 360);
g2.translate(-x, -y);
}
代码示例来源:origin: com.harium/etyl
/**
*
* @param layer
* @param startAngle
* @param arcAngle
*/
public void fillArc(GeometricLayer layer, int startAngle, int arcAngle) {
screen.fillArc((int)layer.getX(), (int)layer.getY(), (int)layer.getW(), (int)layer.getH(), startAngle, arcAngle);
}
代码示例来源:origin: com.harium.etyl/etyl
/**
* @param layer
* @param startAngle
* @param arcAngle
*/
public void fillArc(GeometricLayer layer, int startAngle, int arcAngle) {
screen.fillArc(layer.getX(), layer.getY(), layer.getW(), layer.getH(), startAngle, arcAngle);
}
内容来源于网络,如有侵权,请联系作者删除!