Here is an example of using LINQ with the chart controls:

var pixels = ColorPoint.Pixels(image);

var copy = from pixel in pixels
                 let y = new System.Linq.Charting.Point.DataPoint(image.Height - pixel.Y) { Color = pixel.Color }
                 let x = pixel.X + 1
                 select KeyValuePair.Create(x, y);

var pixelated = new System.Linq.Charting.Point { Points = { copy } };

There are more examples in the Samples directory.

Last edited Mar 6, 2013 at 2:18 AM by malayeri, version 2

Comments

No comments yet.