public boolean containsCurve(BezierCurve curve) {
		Point[] line = new Point[2];
		for (int i = 0; i < points.size(); i++) {
			line[0] = points.get(i);
			line[1] = points.get((i + 1) % points.size());

			List<Double> roots = curve.getLineIntersectionRoots(line[0], line[1]);
			if (roots == null) {
				continue;
			}

			for (int r = 0; r < roots.size(); r++) {
				if (roots.get(r) < GraphLayoutParameters.DOUBLE_PRECISION
						|| roots.get(r) > 1 - GraphLayoutParameters.DOUBLE_PRECISION) {
					/*
					 * Skip the roots that are approximately 0 or 1. They
					 * correspond to (x,y) values on the curve near first and
					 * last control points. Since the first and last control
					 * points of the curve are known to be inside the polygon at
					 * this point, the roots with values approximately 0 or 1
					 * are going to be inside the polygon as well.
					 */
					continue;
				}

				Point intersectionPoint = curve.getCurvePoint(roots.get(r));
				if (intersectionPoint.distanceSquared(line[0]) < Point.PRECISION
						|| intersectionPoint.distanceSquared(line[1]) < Point.PRECISION) {
					/*
					 * If the intersection point lies approximately on the endpoints of the line
					 * segment, i.e., corners of the polygon, it can be ignored.
					 */
					continue;
				}
				return false;
			}
		}
		return true;
	}