private void DrawPolygon(Polygon polygon, Color32 color)
    {
        PixelMask pixelMask = PixelMaskFromPolygon(polygon);

        IntVector2 topLeft, bottomRight;

        CornersOf(polygon, out topLeft, out bottomRight);
        IntVector2 center = topLeft;

        center.x -= pixelMask.width / 2;
        center.y -= pixelMask.height / 2;

        for (int x = 0; x < pixelMask.width; x++)
        {
            for (int y = 0; y < pixelMask.height; y++)
            {
                if (pixelMask.At(x, y))
                {
                    IntVector2 tmp = new IntVector2();
                    tmp.x = x;
                    tmp.y = y;
                    DrawPoint(center + tmp, color);
                }
            }
        }
    }