Gdi+ GDI+;:为什么FillRectangle在玻璃上是透明的,而FillEllipse是不透明的?
我正在玻璃上画一个长方形和一个椭圆Gdi+ GDI+;:为什么FillRectangle在玻璃上是透明的,而FillEllipse是不透明的?,gdi+,aero,dwm,Gdi+,Aero,Dwm,我正在玻璃上画一个长方形和一个椭圆 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
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);
结论:为什么:
绘制不透明使用不透明颜色填充椭圆
使用不透明颜色绘制部分透明FillRectangle
FillRectangle
和
FillEllipse
-鉴于
处理*如何绘制不透明颜色
在玻璃上
另见