I get a big series of points with the guarantee that it's a valid "shape" like a star, crescent, anything. The last point always equals the first point. It draws fine every time but the aliasing is nasty. I tried a lot of things but there is no pixels that are drawn in any color other than red. The graphics object came from an image that was only initialized and then had "Clear" run with the background color.
void DrawPolygon(Graphics g, Point[] points)
{
g.SmoothingMode = SmoothingMode.AntiAlias;
using (GraphicsPath graphPath = new GraphicsPath())
{
graphPath.AddPolygon(points);
using (Brush b = new SolidBrush(Color.Red))
{
g.FillPath(b, graphPath);
}
}
}
I wanted to do my own custom anti-aliasing https://en.wikipedia.org/wiki/Spatial_anti-aliasing but I'm confused on the last line
DrawPixel ( coordinates roundedx, roundedy, color percent (range 0-1) )
I don't understand "color percent (range 0-1) )". If my foreground color is pure red and background is pure green, what would that look like?