Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Tools > Re:Minimal grap...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 544 of 634
Post > Topic >>

Re:Minimal graphics gcc lib for MacOS-X

by ingemar@[EMAIL PROTECTED] (Ingemar) Nov 17, 2006 at 11:05 AM

> Is there a *small* graphics lib

A few simple Carbon calls will do fine. You don't need any extra library,
just use -framework Carbon on the command line (if you are using the
Terminal). NewCWindow, Set****t, MoveTo, LineTo... Something like this:

---
#include <Carbon/Carbon.h>

Rect bounds;
WindowPtr wind;

main()
{
SetRect(&bounds, 100, 100, 356, 356);
wind =
NewCWindow(NULL,&bounds,"\pTest",1,plainDBox,(WindowPtr)-1,0,
0);
Set****tWindow****t(wind);
while (!Button())
{
LineTo(Random() & 255, Random() & 255);
QDFlush****tBuffer(GetWindow****t(wind), NULL);
}
}
---

It can't be much simpler. Of course, I'd like to suggest OpenGl for the
future. ;)
* posted via http://MacErudite.com
* please re****t abuse to http://xinbox.com/mymac
 




 4 Posts in Topic:
Minimal graphics gcc lib for MacOS-X
Jean-Guillaume Pyraksos &  2006-07-11 10:52:53 
Re:Minimal graphics gcc lib for MacOS-X
ingemar@[EMAIL PROTECTED]  2006-11-17 11:05:22 
Re: Minimal graphics gcc lib for MacOS-X
fake@[EMAIL PROTECTED] (  2006-11-18 04:10:38 
Re:Minimal graphics gcc lib for MacOS-X
ingemar@[EMAIL PROTECTED]  2006-11-18 01:54:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 0:55:56 CDT 2008.