java.awt.Graphics2D.drawArc()方法的使用及代码示例

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

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

Graphics2D.drawArc介绍

暂无

代码示例

代码示例来源: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

private void paintReflexive(Graphics2D g) {
 Lifeline startingLine = getStartingLine();
 int x = startingLine.getX();
 int y = endingState.getStartY();
 g.drawArc(x + startingLine.getWidth() - ARROW_WIDTH / 2, y - ARROW_WIDTH, ARROW_WIDTH,
   ARROW_WIDTH, 90, -180);
 g.drawString(label, x + startingLine.getWidth() + LABEL_OFFSET, y);
 // GeneralPath path = new GeneralPath();
 // path.moveTo(x, y - ARROW_WIDTH);
 // path.quadTo(x, y - ARROW_WIDTH);
}

代码示例来源:origin: apache/pdfbox

@Override
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
{
  groupG2D.drawArc(x, y, width, height, startAngle, arcAngle);
  alphaG2D.drawArc(x, y, width, height, startAngle, arcAngle);
}

代码示例来源:origin: geotools/geotools

public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) {
  delegate.drawArc(x, y, width, height, startAngle, arcAngle);
}

代码示例来源:origin: org.apache.pdfbox/pdfbox

@Override
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
{
  groupG2D.drawArc(x, y, width, height, startAngle, arcAngle);
  alphaG2D.drawArc(x, y, width, height, startAngle, arcAngle);
}

代码示例来源:origin: geogebra/geogebra

@Override
public void drawArc(int x, int y, int width, int height, int startAngle,
    int arcAngle) {
  impl.drawArc(x, y, width, height, startAngle, arcAngle);
}

代码示例来源:origin: net.java.openjdk.cacio/cacio-shared

@Override
public void drawArc(int x, int y, int width, int height, int startAngle,
          int arcAngle) {
   wrapped.drawArc(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 drawArc(int x, int y, int w, int h, int startAngle, int arcAngle) {
  screen.drawArc(x, y, w, h, startAngle, arcAngle);
}

代码示例来源:origin: com.samskivert/samskivert

@Override
public void drawArc (int x, int y, int w, int h, int a, int b)
{
  _copy.drawArc(x, y, w, h, a, b);
  _primary.drawArc(x, y, w, h, a, b);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf

/** {@inheritDoc} */
@Override
public void drawArc(int x, int y, int width, int height, int startAngle,
    int arcAngle) {
  g2d.drawArc(x, y, width, height, startAngle, arcAngle);
}

代码示例来源:origin: com.harium/etyl

/**
 *
 * @param x
 * @param y
 * @param w
 * @param h
 * @param startAngle
 * @param arcAngle
 */
public void drawArc(int x, int y, int w, int h, int startAngle, int arcAngle) {
  screen.drawArc(x, y, w, h, startAngle, arcAngle);
}

代码示例来源:origin: RaiMan/SikuliX2

g2d.setStroke(new BasicStroke(stroke));
g2d.setColor(symbol.getColor());
g2d.drawArc(topLeft.x + stroke / 2, topLeft.y + stroke / 2,
    symbol.w - stroke, symbol.h - stroke, 0, 360);
if (SX.isNotNull(symbol.getFillColor())) {

代码示例来源:origin: com.haulmont.thirdparty/poi

public void drawArc(int x, int y, int width, int height,
       int startAngle, int arcAngle)
{
  System.out.println( "drawArc(int,int,int,int,int,int):" );
  System.out.println( "x = " + x );
  System.out.println( "y = " + y );
  System.out.println( "width = " + width );
  System.out.println( "height = " + height );
  System.out.println( "startAngle = " + startAngle );
  System.out.println( "arcAngle = " + arcAngle );
  g2D.drawArc( x, y, width, height, startAngle, arcAngle );
}

代码示例来源:origin: org.openmicroscopy/ome-poi

public void drawArc(int x, int y, int width, int height,
       int startAngle, int arcAngle)
{
  System.out.println( "drawArc(int,int,int,int,int,int):" );
  System.out.println( "x = " + x );
  System.out.println( "y = " + y );
  System.out.println( "width = " + width );
  System.out.println( "height = " + height );
  System.out.println( "startAngle = " + startAngle );
  System.out.println( "arcAngle = " + arcAngle );
  g2D.drawArc( x, y, width, height, startAngle, arcAngle );
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

public void drawArc(int x, int y, int width, int height,
       int startAngle, int arcAngle)
{
  System.out.println( "drawArc(int,int,int,int,int,int):" );
  System.out.println( "x = " + x );
  System.out.println( "y = " + y );
  System.out.println( "width = " + width );
  System.out.println( "height = " + height );
  System.out.println( "startAngle = " + startAngle );
  System.out.println( "arcAngle = " + arcAngle );
  g2D.drawArc( x, y, width, height, startAngle, arcAngle );
}

代码示例来源:origin: org.scijava/j3dcore

@Override
public final void drawArc(int x, int y, int width, int height,
       int startAngle, int arcAngle) {
// XXXX: call validate with bounding box of primitive
validate();
offScreenGraphics2D.drawArc(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: protegeproject/protege

public void paintButtonContent(Graphics2D g) {
    int w = getBounds().width;
    int h = getBounds().height;
    int x = getBounds().x;
    int y = getBounds().y;
    g.drawArc(x + 4, y + 4, w - 8, h - 8, 0, -270);
    final Polygon arrowHead = new Polygon(new int[]{x+(w/2)+3, x+(w/2), x+(w/2)}, new int[]{y+4, y+2, y+6}, 3);
    g.drawPolygon(arrowHead);
  }
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl

public void paintButtonContent(Graphics2D g) {
    int w = getBounds().width;
    int h = getBounds().height;
    int x = getBounds().x;
    int y = getBounds().y;
    g.drawArc(x + 4, y + 4, w - 8, h - 8, 0, -270);
    final Polygon arrowHead = new Polygon(new int[]{x+(w/2)+3, x+(w/2), x+(w/2)}, new int[]{y+4, y+2, y+6}, 3);
    g.drawPolygon(arrowHead);
  }
}

代码示例来源:origin: edu.stanford.protege/protege-editor-owl

public void paintButtonContent(Graphics2D g) {
    int w = getBounds().width;
    int h = getBounds().height;
    int x = getBounds().x;
    int y = getBounds().y;
    g.drawArc(x + 4, y + 4, w - 8, h - 8, 0, -270);
    final Polygon arrowHead = new Polygon(new int[]{x+(w/2)+3, x+(w/2), x+(w/2)}, new int[]{y+4, y+2, y+6}, 3);
    g.drawPolygon(arrowHead);
  }
}

相关文章

Graphics2D类方法