Re: Colors and GDK, this the best way?




That fixed it - thanks.

Using the drawing area with double buffering seems to be pretty quick
for the small stuff I've been doing (wireframe 3-d models) - and
pretty smooth.  Has anyone done anything to test it out - like video
games?  

 -Eric

---Havoc Pennington <rhpennin@midway.uchicago.edu> wrote:
>
> 
> On Sun, 20 Sep 1998, Eric Harlow wrote:
> >     gc = (GdkGC *) malloc (sizeof (GdkGC));
> > 
> 
> OK, this is the problem I bet. You have to use gdk_gc_new() instead of
> malloc - it's not just memory allocation, you also have to do some
> initialization and so on.
> 
> Jon created GdkGC statically, undoubtedly thinking of our Gdk_GC C++
> wrapper which calls gdk_gc_new automatically.
> 
> A side comment: in general you probably want to use g_malloc or g_new
> instead of malloc, that lets you interoperate with Gtk more nicely. 
Plus
> it automatically checks for freeing 0 and the malloc return value.
> 
> Havoc
> 
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
/dev/null
> 
> 

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]