if (getArcType() != CHORD)
if (getArcType() == PIE)
  public boolean contains(double x, double y)  {		double w = getWidth();		double h = getHeight();    double extent = getAngleExtent();    if (w <= 0 || h <= 0 || extent == 0)      return false;    double mx = getX() + w / 2;    double my = getY() + h / 2;    double dx = (x - mx) * 2 / w;    double dy = (y - my) * 2 / h;    if ((dx * dx + dy * dy) >= 1.0)      return false;    double angle = Math.toDegrees(Math.atan2(-dy, dx));    if (getArcType() != CHORD)      return containsAngle(angle);    double a1 = Math.toRadians(getAngleStart());    double a2 = Math.toRadians(getAngleStart() + extent);    double x1 = mx + getWidth() * Math.cos(a1) / 2;    double y1 = my - getHeight() * Math.sin(a1) / 2;    double x2 = mx + getWidth() * Math.cos(a2) / 2;    double y2 = my - getHeight() * Math.sin(a2) / 2;    double sgn = ((x2 - x1) * (my - y1) - (mx - x1) * (y2 - y1)) * ((x2 - x1) * (y                 - y1) - (x - x1) * (y2 - y1));    if (Math.abs(extent) > 180)      {	if (containsAngle(angle))	  return true;	return sgn > 0;      }    else      {	if (! containsAngle(angle))			return false;	return sgn < 0;      }	}