Aero: How to draw solid (opaque) colors on glass?

前端 未结 6 818
孤独总比滥情好
孤独总比滥情好 2020-11-30 03:02

Using GDI+ to draw various colors:

brush = new SolidBrush(color);
graphics.FillRectangle(brush, x, y, width, height);

You\'ll notice that n

6条回答
  •  眼角桃花
    2020-11-30 03:52

    I've found another way around it. Use LinearGradientBrush with both colors the same:

    LinearGradientBrush brush(Point(0,0), Point(0,0), Color(255,231,45,56), Color(255,231,45,56));
    g.FillRectangle(&brush, 25, 25, 30, 30);
    

    This is perhaps slower than SolidBrush, but works fine.

提交回复
热议问题