我在玻璃上画了一个长方形和一个椭圆。
brush = new SolidBrush(0xFF000000); //solid (i.e. non-opaque) black
graphics.FillRectangle(brush, x, y, 30, 30);
graphics.FillEllipse(brush, x+33, y-15, 30, 30);
这是怎么回事?
您可以看到其他颜色也同样适用:
brush = new SolidBrush(0xFFff0000); //solid (i.e. non-opaque) red
graphics.FillRectangle(brush, x, y, 30, 30);
graphics.FillEllipse(brush, x, y+33, 30, 30);
brush = new SolidBrush(0xFF00ff00); //solid (i.e. non-opaque) green
graphics.FillRectangle(brush, x, y, 30, 30);
graphics.FillEllipse(brush, x, y+33, 30, 30);
brush = new SolidBrush(0xFF0000ff); //solid (i.e. non-opaque) blue
graphics.FillRectangle(brush, x, y, 30, 30);
graphics.FillEllipse(brush, x, y+33, 30, 30);
brush = new SolidBrush(0xFFffffff); //solid (i.e. non-opaque) white
graphics.FillRectangle(brush, x, y, 30, 30);
graphics.FillEllipse(brush, x, y+33, 30, 30);
结论
:为什么:
-
FillEllipse
-
FillRectangle
使用不透明颜色绘制部分透明
这个问题几乎是
my other question
.
除了这个问题集中在
差异
和
填充椭圆
-鉴于这个问题
在玻璃上。
另见