Beautify Your UIs with Perfect Pen and Brush Control
Spice up your interfaces by taking full advantage of the Pen and Brush classes capabilities in the .NET Framework. Learn to create dashed and striped lines, control line joins, and use brushes to create interesting patterns and gradients.
by Rod Stephens
October 18, 2006
f you've done any Windows graphics programming at all, you know about Pens and Brushes. Pens determine the characteristics of lines, such as color and thickness. Brushes determine the characteristics of filled areas, notably the fill color.
Many programmers use the Pens class to get stock, one-pixel wide pens of various colors as in the code e.Graphics.DrawLine(Pens.Red, 10, 10, 100, 100).
They also use the Brushes class to get stock solid colored brushes as in:
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!