Section 2

Management of Colors

We've made some color choices as we have been implementing. The background color for our form was arbitrary and only defined in the workspace. The border color is black and so is the mirror. It's likely these colors will be "tweaked" as we develop. Maybe we'll even let the user customize the color choices at a later time. It's my preference to keep these constants in one place. Let's create a class where our code can find the colors to use. It belongs with the graphics system category.

The color constants can be defined as class methods on this class.

Just for fun, I changed the colors slightly from what we've been using so far. Now we need to change all the places where these are used.




Our new drawing looks like this.

Index Page Next Page

Copyright © 2007, 2008, 2009, 2010 Stephan B Wessels    stevewessels@me.com