[gnomemm] RE: Help on Canvas



Hi,

Looks like we have got the problem.

We had to initialize the canvas using the init and wrap_init functions
of Canvas class.

I assume this is equivalent to the gnome_init() function of Gnome2
library.

Thanks,

Nasir

-----Original Message-----
From: Nasir Chandwale [mailto:nasirc dpsl net] 
Sent: Thursday, December 26, 2002 2:17 PM
To: 'gnomemm-list gnome org'
Subject: Help on Canvas

Hi
 
    We have created gnomemm2.0 project in Anjuta IDE.
    We have created a canvas in antiliased mode. To this canvas we need
to   
    add an image item. We have already loaded the image into a
GDK::Pixbuf 
    object.
 
    In our Gnome 1.2 (C based Gnome) implementation we followed the
following 
steps
   1) Create a canvas object
   2) Create a Group using the Root Group of the Canvas
   3) To the new Group created add the image item.
    This worked perfectly fine in the C version of Gnome 1.2
   
   We followed the same strategy in case of gnomemm2.0.
**********code*************************************************
 
  Gnome::Canvas::CanvasAA canvas1 = manage(new
class                          
                        Gnome::Canvas::CanvasAA());
 
   Gnome::Canvas::Group* rootgroup = 0;
 
   rootgroup = manage(new
class                                               
 Gnome::Canvas::Group(*(canvas1->root()),(double)0,(double)0));
 
  
************************************************************************
*****
       
       When we are creating the group the application gives segmentation

       fault and exits.
       We debugged the code and found that "canvas->root()" is returning
NULL 
       value. 
       Can somebody please point out what might be going wrong?
       Please provide us with some solution.
  
        TIA
 
thanks and regards,
   
   
   
  
 
   
 
 



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