コード例 #1
0
  public RectShape(String name, int sx, int sy, int ex, int ey, Color c) {
    super(name, c);

    rect.left = sx;
    rect.top = sy;
    rect.right = ex;
    rect.bottom = ey;

    this.updateGeometricState();
  }
コード例 #2
0
 public void updateCoordsXYWH(int x, int y, int w, int h) {
   rect.left = x;
   rect.top = y;
   rect.right = x + w;
   rect.bottom = y + h;
 }