I want to write my own Anti Aliasing Algorithm in C#. My picture has only two colors; black and white.
On Wikipedia (https://en.wikipedia.org/wiki/Spatial_anti-aliasing) I found the following pseudecode:
Define function PlotAntiAliasedPoint ( number x, number y )
For roundedx = floor ( x ) to ceil ( x ) do
For roundedy = floor ( y ) to ceil ( y ) do
percent_x = 1 - abs ( x - roundedx )
percent_y = 1 - abs ( y - roundedy )
percent = percent_x * percent_y
DrawPixel ( coordinates roundedx, roundedy, color percent (range 0-1) )
How do I implement this pseudocode in C#?