A paint brush is an object that can be used together with a graphics object to create a solid shape and render text.
1. The simplest form of solidbrush is to draw with solid color.
2. hatchbrush is similar to (1), but it can select a large number of Preset patterns instead of solid colors. (Namespace using system. Drawing. drawing2d ;)
3. Use texturebrush to draw images
4. lineargradientbrush is drawn using two colors mixed with lead linear gradient.
5. pathgradientbrush is based on the unique path defined by the developer and is drawn using a complex mixed color gradient.
private void button#click (Object sender, eventargs e)
{< br> // hatchbrush ahatchbrush = new hatchbrush (hatchstyle. plaid, color. red, color. blue);
// texturebrush mybrush = new texturebrush (New Bitmap (@ "C:/users/wu_kobe/pictures/1.jpg "));
graphics G = creategraphics ();
// solidbrush mybrush = new solidbrush (color. red);
lineargradientbrush mybrush = new lineargradientbrush (clientrectangle,
color. red, color. yellow, lineargradientmode. backwarddiagonal);
G. fillellipse (mybrush, clientrectangle);
}