Examples of drawLine()


Examples of java.awt.Graphics.drawLine()

      pt1 = pt0.translate(face, 0, -6);
    }
    if (painter.getShowState()) {
      g.setColor(painter.getPort(2).getColor());
    }
    g.drawLine(pt0.getX(), pt0.getY(), pt1.getX(), pt1.getY());

    // draw triangle
    g.setColor(Color.BLACK);
    paintShape(painter);
View Full Code Here

Examples of java.awt.Graphics.drawLine()

    int[] yp = new int[] { -width / 2, -width / 2, width / 2, width / 2 };
    GraphicsUtil.drawCenteredArc(g, -width / 2, 0, width / 2, -90, 180);

    g.drawPolyline(xp, yp, 4);
    if (height > width) {
      g.drawLine(-width + 1, -height / 2, -width + 1, height / 2);
    }
  }
 
  static void paintOr(InstancePainter painter, int width, int height) {
    Graphics g = painter.getGraphics();
View Full Code Here

Examples of java.awt.Graphics.drawLine()

        x += fm.stringWidth(str);
      } else {
        x += fm.stringWidth(str.substring(0, cursor));
      }
      int y = bds.getY() + (bds.getHeight() + asc) / 2;
      g.drawLine(x, y - asc, x, y);
    }
  }
}
View Full Code Here

Examples of java.awt.Graphics.drawLine()

    Location loc = painter.getLocation();
    int x = loc.getX();
    int y = loc.getY();
    GraphicsUtil.switchToWidth(g, 2);
    g.setColor(Color.BLACK);
    g.drawLine(x - 15, y, x - 5, y);
    GraphicsUtil.switchToWidth(g, 1);
  }
}
View Full Code Here

Examples of java.awt.Graphics.drawLine()

    Location loc = painter.getLocation();
    int x = loc.getX();
    int y = loc.getY();
    GraphicsUtil.switchToWidth(g, 2);
    g.setColor(Color.BLACK);
    g.drawLine(x - 15, y - 5, x - 5, y + 5);
    g.drawLine(x - 15, y + 5, x - 5, y - 5);
    GraphicsUtil.switchToWidth(g, 1);
  }

View Full Code Here

Examples of java.awt.Graphics.drawLine()

    int x = loc.getX();
    int y = loc.getY();
    GraphicsUtil.switchToWidth(g, 2);
    g.setColor(Color.BLACK);
    g.drawLine(x - 15, y - 5, x - 5, y + 5);
    g.drawLine(x - 15, y + 5, x - 5, y - 5);
    GraphicsUtil.switchToWidth(g, 1);
  }


  static Value[] computeProduct(BitWidth width, Value a, Value b, Value c_in) {
View Full Code Here

Examples of java.awt.Graphics.drawLine()

            g.setColor(val.getColor());
          } else {
            g.setColor(baseColor);
          }
          Location dst = src.translate(facing, len);
          g.drawLine(src.getX(), src.getY(), dst.getX(), dst.getY());
        }
        if (((negated >> i) & 1) == 1) {
          Location cent = src.translate(facing, lengths[i] + 5);
          g.setColor(baseColor);
          painter.drawDongle(cent.getX(), cent.getY());
View Full Code Here

Examples of java.awt.Graphics.drawLine()

    if (inputs == 2) { // draw select wire
      Location pt = painter.getInstance().getPortLocation(inputs);
      if (painter.getShowState()) {
        g.setColor(painter.getPort(inputs).getColor());
      }
      g.drawLine(pt.getX() - 2 * dx, pt.getY() - 2 * dy,
          pt.getX(), pt.getY());
    }
    if (enable) {
      Location en = painter.getInstance().getPortLocation(inputs + 1);
      if (painter.getShowState()) {
View Full Code Here

Examples of java.awt.Graphics.drawLine()

      Location en = painter.getInstance().getPortLocation(inputs + 1);
      if (painter.getShowState()) {
        g.setColor(painter.getPort(inputs + 1).getColor());
      }
      int len = inputs == 2 ? 6 : 4;
      g.drawLine(en.getX() - len * dx, en.getY() - len * dy,
          en.getX(), en.getY());
    }
    GraphicsUtil.switchToWidth(g, 1);
   
    // draw a circle indicating where the select input is located
View Full Code Here

Examples of java.awt.Graphics.drawLine()

    Location loc = painter.getLocation();
    int x = loc.getX();
    int y = loc.getY();
    GraphicsUtil.switchToWidth(g, 2);
    g.setColor(Color.BLACK);
    g.drawLine(x - 15, y, x - 5, y);
    g.drawLine(x - 10, y - 5, x - 10, y + 5);
    GraphicsUtil.switchToWidth(g, 1);
  }

  static Value[] computeSum(BitWidth width, Value a, Value b, Value c_in) {
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.