Esempio n. 1
0
 public void Flip_WorksOnWrappedMemoryImage <TPixel>(TestImageProvider <TPixel> provider, FlipMode flipMode)
     where TPixel : struct, IPixel <TPixel>
 {
     provider.RunValidatingProcessorTestOnWrappedMemoryImage(
         ctx => ctx.Flip(flipMode),
         testOutputDetails: flipMode,
         useReferenceOutputFrom: nameof(this.Flip),
         appendPixelTypeToFileName: false);
 }
Esempio n. 2
0
 public void DetectEdges_WorksOnWrappedMemoryImage <TPixel>(TestImageProvider <TPixel> provider)
     where TPixel : struct, IPixel <TPixel>
 {
     provider.RunValidatingProcessorTestOnWrappedMemoryImage(
         ctx =>
     {
         Size size  = ctx.GetCurrentSize();
         var bounds = new Rectangle(10, 10, size.Width / 2, size.Height / 2);
         ctx.DetectEdges(bounds);
     },
         useReferenceOutputFrom: nameof(this.DetectEdges_InBox));
 }
Esempio n. 3
0
        public void FillRegion_WorksOnWrappedMemoryImage <TPixel>(TestImageProvider <TPixel> provider, int x0, int y0, int w, int h)
            where TPixel : struct, IPixel <TPixel>
        {
            FormattableString testDetails = $"(x{x0},y{y0},w{w},h{h})";
            var    region = new RectangleF(x0, y0, w, h);
            TPixel color  = TestUtils.GetPixelOfNamedColor <TPixel>("Blue");

            provider.RunValidatingProcessorTestOnWrappedMemoryImage(
                c => c.Fill(color, region),
                testDetails,
                ImageComparer.Exact,
                useReferenceOutputFrom: nameof(this.FillRegion));
        }