How to draw lines with C++ Xcode Carbon
I am an experienced C++ programmer, but I have never used Xcode or Carbon before.
I am running OS X 10.4.11. It would be nice if the generated code ran under all OS X systems. I am running XCode 2.5.
It would help me to get started if I could see some code to do the following:
- Create a graphics window with a black background.
- Draw a blue line from [0, 0] to [500, 500] in that window.
- Draw another blue line from [0, 500] to [500, 0] to make an "X" shape.
I have a huge amount of C++ code written for OS 9 in MPW. I would like to port it to OS X. Mostly, all it does, graphics-wise, is draw a bunch of lines and characters on the screen. Any help in getting started (including any pointers to relevant tutorials) would be greatly appreciated.
Thank you!
Twinerik
Mac OS X (10.4.11)