return true;
}
double cx = getCenterX();
double cy = getCenterY();
Point2D p1 = getStartPoint();
Point2D p2 = getEndPoint();
Rectangle2D r = new Rectangle2D.Double(rx, ry, rw, rh);
// Check: Does rectangle contain arc's points
if (r.contains(p1) || r.contains(p2) || (type == PIE && r.contains(cx, cy))) {
return true;
}
if (type == PIE) {
if (r.intersectsLine(p1.getX(), p1.getY(), cx, cy) ||
r.intersectsLine(p2.getX(), p2.getY(), cx, cy))
{
return true;
}
} else {
if (r.intersectsLine(p1.getX(), p1.getY(), p2.getX(), p2.getY())) {
return true;
}
}
// Nearest rectangle point