def test_bounding_box_path_hv(assert_pixels):
    assert_pixels('''
        BBBBB
        BBBBR
        BBBRR
        BBRRR
        BRRRR
    ''', '''
      <style>
        @page { size: 5px }
        svg { display: block }
      </style>
      <svg width="5px" height="5px" 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>
        <path d="m 5 0 v 5 h -5 V 0 H 5 z" fill="url(#grad)" />
      </svg>
    ''')
,
tests/draw/svg/test_bounding_box.py