Example #1
0
 /// <summary>
 /// Applies a user defined processing delegate to the image.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="rowOperation">The user defined processing delegate to use to modify image rows.</param>
 /// <param name="rectangle">
 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
 /// </param>
 /// <param name="modifiers">The <see cref="PixelConversionModifiers"/> to apply during the pixel conversions.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation <Point> rowOperation, Rectangle rectangle, PixelConversionModifiers modifiers)
 => source.ApplyProcessor(new PositionAwarePixelRowDelegateProcessor(rowOperation, modifiers), rectangle);
Example #2
0
 /// <summary>
 /// Applies a user defined processing delegate to the image.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="rowOperation">The user defined processing delegate to use to modify image rows.</param>
 /// <param name="modifiers">The <see cref="PixelConversionModifiers"/> to apply during the pixel conversions.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation rowOperation, PixelConversionModifiers modifiers)
 => source.ApplyProcessor(new PixelRowDelegateProcessor(rowOperation, modifiers));
Example #3
0
 /// <summary>
 /// Applies a user defined processing delegate to the image.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="rowOperation">The user defined processing delegate to use to modify image rows.</param>
 /// <param name="rectangle">
 /// The <see cref="Rectangle"/> structure that specifies the portion of the image object to alter.
 /// </param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation <Point> rowOperation, Rectangle rectangle)
 => ProcessPixelRowsAsVector4(source, rowOperation, rectangle, PixelConversionModifiers.None);
Example #4
0
 /// <summary>
 /// Applies a user defined processing delegate to the image.
 /// </summary>
 /// <param name="source">The image this method extends.</param>
 /// <param name="rowOperation">The user defined processing delegate to use to modify image rows.</param>
 /// <returns>The <see cref="IImageProcessingContext"/> to allow chaining of operations.</returns>
 public static IImageProcessingContext ProcessPixelRowsAsVector4(this IImageProcessingContext source, PixelRowOperation rowOperation)
 => ProcessPixelRowsAsVector4(source, rowOperation, PixelConversionModifiers.None);
 public PixelRowDelegate(PixelRowOperation pixelRowOperation)
 {
     this.pixelRowOperation = pixelRowOperation;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PixelRowDelegateProcessor"/> class.
 /// </summary>
 /// <param name="pixelRowOperation">The user defined, row processing delegate.</param>
 /// <param name="modifiers">The <see cref="PixelConversionModifiers"/> to apply during the pixel conversions.</param>
 public PixelRowDelegateProcessor(PixelRowOperation pixelRowOperation, PixelConversionModifiers modifiers)
 {
     this.PixelRowOperation = pixelRowOperation;
     this.Modifiers         = modifiers;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PositionAwarePixelRowDelegateProcessor"/> class.
 /// </summary>
 /// <param name="pixelRowOperation">The user defined, position aware, row processing delegate.</param>
 /// <param name="modifiers">The <see cref="PixelConversionModifiers"/> to apply during the pixel conversions.</param>
 public PositionAwarePixelRowDelegateProcessor(PixelRowOperation <Point> pixelRowOperation, PixelConversionModifiers modifiers)
 {
     this.PixelRowOperation = pixelRowOperation;
     this.Modifiers         = modifiers;
 }
Example #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PositionAwarePixelRowDelegateProcessor{TPixel}"/> class.
 /// </summary>
 /// <param name="configuration">The configuration which allows altering default behaviour or extending the library.</param>
 /// <param name="definition">The <see cref="PositionAwarePixelRowDelegateProcessor"/> defining the processor parameters.</param>
 /// <param name="source">The source <see cref="Image{TPixel}"/> for the current processor instance.</param>
 /// <param name="sourceRectangle">The source area to process for the current processor instance.</param>
 public PositionAwarePixelRowDelegateProcessor(Configuration configuration, PositionAwarePixelRowDelegateProcessor definition, Image <TPixel> source, Rectangle sourceRectangle)
     : base(configuration, definition.Modifiers, source, sourceRectangle)
 {
     this.pixelRowOperation = definition.PixelRowOperation;
 }