if (!src1.sorted || !src2.sorted ||
src1.getRectCount() <= MAX_SIMPLE || src2.getRectCount() <= MAX_SIMPLE)
{
dst.setRect(simpleIntersect(src1, src2), false);
} else {
Rectangle bounds1 = src1.getBounds();
Rectangle bounds2 = src2.getBounds();
Rectangle bounds3 = bounds1.intersection(bounds2);
if (bounds3.width > 0 && bounds3.height > 0) {
intersectRegions(src1.rect, src2.rect, dst, bounds1.height + 2, bounds2.height + 2);
}
}