Workshop


The Workshop is designed to help you anticipate possible questions, review what you've learned, and begin learning how to put your knowledge into practice. The answers to the quiz can be found in Appendix A, "Quiz Answers."

Quiz

1:

How is the Windows graphics coordinate system laid out?

2:

What three colors form the components of a color in Windows?

3:

If you use the GetDC() function to obtain a device context for drawing graphics, what function must you call to release the device context?

4:

When you use the TextOut() function to draw text, what is the drawing position based on?

Exercises

  1. Create a pen in a color of your choosing, and then use it in the GamePaint() function of the Trippy program to draw grid lines in that color.

  2. Modify the random color values used for the brush in the GameCycle() method of the Trippy program to see how different combinations work. For example, change the red component so that it is fixed at either or 255 , and then shorten the range of the green or blue component.



Sams Teach Yourself Game Programming in 24 Hours
Sams Teach Yourself Game Programming in 24 Hours
ISBN: 067232461X
EAN: 2147483647
Year: 2002
Pages: 271

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net