0

我得到了一大串分数,保证它是一个有效的“形状”,比如星星、新月,任何东西。最后一点总是等于第一点。它每次都画得很好,但混叠很讨厌。我尝试了很多东西,但没有以红色以外的任何颜色绘制的像素。图形对象来自仅初始化然后以背景颜色“清除”运行的图像。

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);
            }
        }
    }

我想做我自己的自定义抗锯齿https://en.wikipedia.org/wiki/Spatial_anti-aliasing但我对最后一行感到困惑

 DrawPixel ( coordinates roundedx, roundedy, color percent (range 0-1) )

我不明白“颜色百分比(范围 0-1))”。如果我的前景色是纯红色,背景是纯绿色,那会是什么样子?

4

0 回答 0