public Scanning(int height, GC gc) {
        y = height;

        intersectionPoints = new ArrayList<Point2D>();

        int i, j;
        Edge edge;

        for (i = 0; i < Main.shapes.size(); i++) {
            for (j = 0; j < Main.shapes.get(i).edges.size(); j++) {
                edge = Main.shapes.get(i).edges.get(j);
                if (edge.isIntersectLine(y) && edge.isVisible()) {
                    if (!Double.isNaN(edge.getIntersectionX(y))) {
                        intersectionPoints.add(new Point2D(edge.getIntersectionX(y), y, j));
                    }
                }
            }
        }

        if (intersectionPoints.size() != 0)
            sortIntersections();

        if (previousIntersectionPoints == null) {
            previousIntersectionPoints = intersectionPoints;
        }
        else if (isSameIntersections()) {
            fastDraw = true;
        }
        else {
            fastDraw = false;
            previousIntersectionPoints = intersectionPoints;
        }

        drawLines(gc);
    }