|
using System;
using System.Collections.Generic;
using System.Drawing;
namespace ImagePixelEnumerator.PathProviders
{
public class StandardPathProvider : IPathProvider
{
public IList<Point> GetPointPath(Int32 width, Int32 height)
{
List<Point> result = new List<Point>(width*height);
for (Int32 y = 0; y < height; y++)
for (Int32 x = 0; x < width; x++)
{
Point point = new Point(x, y);
result.Add(point);
}
return result;
}
public static IList<Point> CreatePath(Int32 width, Int32 height)
{
StandardPathProvider result = new StandardPathProvider();
return result.GetPointPath(width, height);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.