def test_bounding_box_ellipse(assert_pixels):
    assert_pixels('''
        __________
        __BBBBBB__
        _BBBBBBBR_
        _BBBBBBRR_
        _BBBBBRRR_
        _BBBBRRRR_
        _BBBRRRRR_
        _BBRRRRRR_
        __RRRRRR__
        __________
    ''', '''
      <style>
        @page { size: 10px }
        svg { display: block }
      </style>
      <svg width="10px" height="10px" xmlns="http://www.w3.org/2000/svg">
        <defs>
          <linearGradient id="grad" x1="0" y1="0" x2="1" y2="1"
            gradientUnits="objectBoundingBox">
            <stop stop-color="blue" offset="55%"></stop>
            <stop stop-color="red" offset="55%"></stop>
          </linearGradient>
        </defs>
        <ellipse cx="5" cy="5" rx="4" ry="4" fill="url(#grad)" />
      </svg>
    ''')
,
tests/draw/svg/test_bounding_box.py