Prerequisites
Description
When applying a ImageBrush to a region that overlaps a negative postion the texture start drawing at the backound image edge rather than being offset.
[Theory]
[WithTestPatternImage(400, 400, PixelTypes.Rgba32)]
public void CanOffsetImage<TPixel>(TestImageProvider<TPixel> provider)
where TPixel : unmanaged, IPixel<TPixel>
{
byte[] data = TestFile.Create(TestImages.Png.Ducky).Bytes;
using Image<TPixel> background = provider.GetImage();
using Image overlay = Image.Load<Rgba32>(data);
var brush = new ImageBrush(overlay);
background.Mutate(c => c.Fill(brush, new RectangularPolygon(0, 0, 400, 200)));
background.Mutate(c => c.Fill(brush, new RectangularPolygon(-100, 200, 500, 200)));
background.DebugSave(provider, appendSourceFileOrDescription: false);
background.CompareToReferenceOutput(provider, appendSourceFileOrDescription: false);
}
Currently produces

Should produce

this only effects negative offsets as postive ones work correctly
var brush = new ImageBrush(overlay);
background.Mutate(c => c.Fill(brush, new RectangularPolygon(0, 0, 400, 200)));
background.Mutate(c => c.Fill(brush, new RectangularPolygon(150, 200, 500, 200)));

Prerequisites
DEBUGandRELEASEmodeDescription
When applying a ImageBrush to a region that overlaps a negative postion the texture start drawing at the backound image edge rather than being offset.
Currently produces
Should produce
this only effects negative offsets as postive ones work correctly