I recently have found a strange behavior of DrawPolygon API of GDI plus. That is if I set the alpha value of the pen to 255 (No transparency), it gives me a result, but if I set the alpha to a number between 0-255, it gives me another result.
Here are they:
This is the result with no transparency
And this is the result with if I set the alpha value of the pen to 100:
Without the difference of the pen's alpha value, they both have the same condition as below:
gdi.InterpolationMode = GDI.Drawing2D.InterpolationMode.NearestNeighbor;
gdi.SmoothingMode = GDI.Drawing2D.SmoothingMode.None;
gdi.CompositingMode = GDI.Drawing2D.CompositingMode.SourceCopy;
GDI.Pen pen = new GDI.Pen(GDI.Color.FromArgb(a, r, g, b), 1); // The pen width is 1
And the array of points for drawing: {(0, 2), (2, 2), (1, 0)}
Do you know the reason for this difference?