public void draw(BufferedImage canvas, boolean drawEdge, boolean drawCorners)
    {
        for (int y = 2; y < _height-2; y++)
        for (int x = 2; x < _width-2; x++)
        {
            if (_image[y][x] == FILLED)
            {
                canvas.setRGB(x + _left, y + _top, ImageSegmenter._drawColor[_type]);
            }
            else if (drawEdge && _image[y][x] == EDGE)
            {
                canvas.setRGB(x+_left, y+_top, 0x000000);
            }
        }
        
        
        if (drawCorners)
        {
            findLines();
            if (_lines != null)
            for (LineSegment line : _lines)
                line.draw(canvas.createGraphics(), _left, _top);
        }
    }