Skip to content
  • Oliver Sander's avatar
    Use additional samples to test for constant parts of an axial gradient · c97d3153
    Oliver Sander authored
    The method doAxialShFill does adaptive sampling of gradients.
    If the gradient color is found to be the same at two consecutive
    sampling locations then the gradient is concluded to be constant
    between the two locations.
    
    Of course, this conclusion may be wrong; one instance of this
    happening is
    
      poppler/poppler#938
    
    This patch fixes rendering of the test file in issue 938 by doing
    one more sampling when a part of the gradient is suspected to be
    constant.  Of course it is easily possible to create gradients
    also misrender with the additional sampling point.  Should such
    gradients ever appear in actual non-synthetic documents the code
    can now easily handle yet more sample points.
    
    Fixes: poppler/poppler#938
    c97d3153