Im using the http://writeablebitmapex.codeplex.com/ WPF dll. For drawing objects on a writeablebitmap. Now I dont want to have antialised pixels.
for example I draw a circle
using (writeableBmp.GetBitmapContext())
{
writeableBmp.FillEllipse((int)origin.X, (int)origin.Y, (int)(origin.X + ell.Width), (int)(origin.Y + ell.Height), Colors.Blue);
}
img.Source = writeableBmp.Resize(68, 42, WriteableBitmapExtensions.Interpolation.NearestNeighbor);
I want to have sharp edges.
Why do I need that? I have LED strips with a resolution of 68 x 42 and I write a WPF application to control them. any idea i can manage that?
UPDATE: the solution of my problem is quite simple just set the RenderOptions
RenderOptions.SetBitmapScalingMode(i, BitmapScalingMode.NearestNeighbor); RenderOptions.SetEdgeMode(i, EdgeMode.Aliased