rbulph Posted November 30, 2006 Posted November 30, 2006 Given a brush, how do you get its colour? And vice versa - given a colour, how can you get a brush with that colour? Quote
MrPaul Posted November 30, 2006 Posted November 30, 2006 Brushes and colours There are various kinds of brushes, and only the SolidBrush has a specific colour. Test if your brush is a SolidBrush, then cast it to a SolidBrush and access its Color member. Similarly, you can turn a colour into a brush by creating a new SolidBrush based on it: Brush br = new SolidBrush(col); col = (br as SolidBrush).Color; Good luck :cool: Quote Never trouble another for what you can do for yourself.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.