Re: [gtkmm] Gdk::GC doesn't work as described



On 06 Dec 2002 10:44:59 +0100
murrayc t-online de (Murray Cumming) wrote:

> On Fri, 2002-12-06 at 04:30, Juan Linietsky wrote:
> > Glib::RefPtr<Gdk::GC> MyGC;
> > MyGC = Gdk::GC::create(drawingarea);
> > 
> > It used to be
> > Gdk_GC MyGC;
> > MyGC.create(drawingarea);
> > 
> > Beats me why it needs to be that more complicated, I am probably doing something wrong anyway.
> 
> The new way is far simpler and more consistent. You'll get used to it.
> You can of course simplify your first line to:
> Glib::RefPtr<Gdk::GC> refGC = Gdk::GC::create(drawingarea);
> 
> In particular, you should never need to worry about reference counting
> in gtkmm2, just pass those RefPtrs around and let the RefPtr worry about
> the details.
> 

Ok, I suppose i'll get used to it, thanks!
Althought there is one thing I still dont understand..
Is there any documentation on how to do text rendering to a drawable?
GTK+2 seems to have such methods (althought inside a "deprecated" ifdef).
I noticed that now I am forced to use pangomm, but i really cant
figure out the usage.

Thanks!

Juan Linietsky



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