Package java.awt

Examples of java.awt.Graphics.drawOval()


           
            // draw the points marking the corners
            tempGraphics.drawOval(tempTopX, tempTopY, 4,4);
            tempGraphics.drawOval(tempTopX, tempBottomY, 4,4);
            tempGraphics.drawOval(tempBottomX, tempTopY, 4,4);
            tempGraphics.drawOval(tempBottomX, tempBottomY, 4,4);
        }
       
        return true;
       
    }
View Full Code Here


    short s2 = (short) (s / 2);
    SimpleImage img = new SimpleImage(s + 120, s + 120);
    Graphics g = img.getGraphics();
    g.setColor(new Color(255, 0, 0));
    // fillOval gave strange effects at low scales, but drawOval seems to work
    g.drawOval(0, 0, s - 1, s - 1);

    // fill it manually
    for (short i = 0; i < s; i++) {
      nextLine: for (short j = 0; j <= s2; j++) {
        if (img.getRValue(j, i) == 255) {
View Full Code Here

        floats[2] = 0;
      }

      final Graphics graphics = g.create();
      graphics.setColor(Color.getHSBColor(floats[0], floats[1], floats[2]));
      graphics.drawOval((int) ((lastPointX * getWidth()) - 2), (int) ((lastPointY * getHeight()) - 2), 4, 4);
      graphics.dispose();
    }
  }

  private float[] computeSelectedPosition()
View Full Code Here

      floats[2] = 1 - floats[2];
      floats[1] = 0;

      final Graphics graphics = g.create();
      graphics.setColor(Color.getHSBColor(floats[0], floats[1], floats[2]));
      graphics.drawOval(color.x - 2, color.y - 2, 4, 4);
      graphics.dispose();
    }
  }

  private Point computeSelectedPosition()
View Full Code Here

            gCopy.drawRect(x, y, w, h);
          } else {
            if (b.getWidth() > 25) {
              gCopy.drawRoundRect(x, y, w, h, 4, 4);
            } else {
              gCopy.drawOval(x, y, w, h);
            }
          }
        }
      }
      gCopy.dispose();
View Full Code Here

      int x = loc.getX();
      int y = loc.getY();
      Graphics g = context.getGraphics();
      g.setColor(Value.TRUE_COLOR);
      GraphicsUtil.switchToWidth(g, 2);
      g.drawOval(x - 5, y - 5, 10, 10);
      g.setColor(Color.BLACK);
      GraphicsUtil.switchToWidth(g, 1);
    }
    current.draw(canvas, context);
  }
View Full Code Here

      } else {
        g.setColor(MAGNIFYING_INTERIOR);
      }
      g.fillOval(cx - 5, cy - 5, 10, 10);
      g.setColor(Color.BLACK);
      g.drawOval(cx - 5, cy - 5, 10, 10);
      g.fillPolygon(xp, yp, xp.length);
    }
  }
 
  @Override
View Full Code Here

    } else if (dir == Direction.SOUTH) { pinx = 9; piny = 16;
    }

    g.setColor(Color.black);
    if (output) {
      g.drawOval(4, 4, 13, 13);
    } else {
      g.drawRect(4, 4, 13, 13);
    }
    g.setColor(Value.TRUE.getColor());
    g.fillOval(7, 788);
View Full Code Here

    GraphicsUtil.switchToWidth(g, 2);
    boolean output = attrs.isOutput();
    if (output) {
      BitWidth width = attrs.getValue(StdAttr.WIDTH);
      if (width == BitWidth.ONE) {
        g.drawOval(x + bds.getX() + 1, y + bds.getY() + 1,
          bds.getWidth() - 1, bds.getHeight() - 1);
      } else {
        g.drawRoundRect(x + bds.getX() + 1, y + bds.getY() + 1,
          bds.getWidth() - 1, bds.getHeight() - 1, 6, 6);
      }
View Full Code Here

    int y = bds.getY();
    GraphicsUtil.switchToWidth(g, 2);
    g.setColor(Color.black);
    if (attrs.type == EndData.OUTPUT_ONLY) {
      if (attrs.width.getWidth() == 1) {
        g.drawOval(x + 1, y + 1,
          bds.getWidth() - 1, bds.getHeight() - 1);
      } else {
        g.drawRoundRect(x + 1, y + 1,
          bds.getWidth() - 1, bds.getHeight() - 1, 6, 6);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.