Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AffineBaseClass"/> class.
 /// </summary>
 /// <param name="width">The new width.</param>
 /// <param name="height">The new height.</param>
 /// <param name="filter">The filter to use (defaults to nearest neighbor).</param>
 protected AffineBaseClass(int width = -1, int height = -1, ResamplingFiltersAvailable filter = ResamplingFiltersAvailable.NearestNeighbor)
 {
     Width            = width;
     Height           = height;
     ResamplingFilter = new Dictionary <ResamplingFiltersAvailable, IResamplingFilter>
     {
         { ResamplingFiltersAvailable.Bell, new BellFilter() },
         { ResamplingFiltersAvailable.CatmullRom, new CatmullRomFilter() },
         { ResamplingFiltersAvailable.Cosine, new CosineFilter() },
         { ResamplingFiltersAvailable.CubicBSpline, new CubicBSplineFilter() },
         { ResamplingFiltersAvailable.CubicConvolution, new CubicConvolutionFilter() },
         { ResamplingFiltersAvailable.Hermite, new HermiteFilter() },
         { ResamplingFiltersAvailable.Lanczos3, new Lanczos3Filter() },
         { ResamplingFiltersAvailable.Lanczos8, new Lanczos8Filter() },
         { ResamplingFiltersAvailable.Mitchell, new MitchellFilter() },
         { ResamplingFiltersAvailable.Quadratic, new QuadraticFilter() },
         { ResamplingFiltersAvailable.QuadraticBSpline, new QuadraticBSplineFilter() },
         { ResamplingFiltersAvailable.Triangle, new TriangleFilter() },
         { ResamplingFiltersAvailable.Bilinear, new BilinearFilter() },
         { ResamplingFiltersAvailable.NearestNeighbor, new NearestNeighborFilter() },
         { ResamplingFiltersAvailable.Robidoux, new RobidouxFilter() },
         { ResamplingFiltersAvailable.RobidouxSharp, new RobidouxSharpFilter() },
         { ResamplingFiltersAvailable.RobidouxSoft, new RobidouxSoftFilter() },
         { ResamplingFiltersAvailable.Bicubic, new BicubicFilter() }
     };
     Filter = ResamplingFilter[filter];
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="Skew"/> class.
 /// </summary>
 /// <param name="xAngle">The x angle.</param>
 /// <param name="yAngle">The y angle.</param>
 /// <param name="filter">The filter.</param>
 public Skew(float xAngle, float yAngle, ResamplingFiltersAvailable filter = ResamplingFiltersAvailable.NearestNeighbor)
     : base(filter: filter)
 {
     XAngle = -xAngle * (float)(Math.PI / 180f);
     YAngle = -yAngle * (float)(Math.PI / 180f);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AffineTransformation"/> class.
 /// </summary>
 /// <param name="matrix">The matrix.</param>
 /// <param name="width">The new width.</param>
 /// <param name="height">The new height.</param>
 /// <param name="filter">The filter to use (defaults to nearest neighbor).</param>
 public AffineTransformation(Matrix3x2 matrix, int width = -1, int height = -1, ResamplingFiltersAvailable filter = ResamplingFiltersAvailable.NearestNeighbor)
     : base(width, height, filter)
 {
     Matrix = matrix;
 }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Flip"/> class.
 /// </summary>
 /// <param name="direction">The direction.</param>
 /// <param name="filter">The filter.</param>
 public Flip(FlipDirection direction, ResamplingFiltersAvailable filter = ResamplingFiltersAvailable.NearestNeighbor)
     : base(filter: filter)
 {
     Direction = direction;
 }
Exemple #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Scale"/> class.
 /// </summary>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 /// <param name="filter">The filter to use (defaults to nearest neighbor).</param>
 public Scale(int width, int height, ResamplingFiltersAvailable filter = ResamplingFiltersAvailable.NearestNeighbor)
     : base(width, height, filter)
 {
 }