>----Messaggio originale----
>Da: [EMAIL PROTECTED]
>Data: 25/02/2008 3.13
>A: "Gennaro Bellizio"<[EMAIL PROTECTED]>
>Cc: <[email protected]>
>Ogg: Re: Goocanvasmm
>
>On Wed, 2008-02-20 at 22:45 +0100, Gennaro Bellizio wrote:
>> 
>> >----Messaggio originale----
>> >Da: [EMAIL PROTECTED]
>> >Data: 20/02/2008 16.54
>> >A: "Gennaro Bellizio"<[EMAIL PROTECTED]>
>> >Cc: <[email protected]>
>> >Ogg: Re: Goocanvasmm
>> >
>> 
>> >I'm afraid I don't really understand exactly what the problem is.
>> >Could you provide a small code example that shows the issue that
>> >you're having?
>> >
>> >-- 
>> >jonner
>> >
>> 
>> Let's consider the coordinates example. When I run the application 
no 
>> rectangle is displayed onto the canvas. 
>
>Really?  It displays fine for me.

It's strange. Can I ask you what distro are you using? I'm using 
ubuntu 7.04 on both AMD64 and x86 cpus.

>
>> -  Glib::RefPtr<Goocanvas::Item> root = m_canvas.get_root_item();
>> -  m_rect = Goocanvas::Rect::create(10, 10, 60, 60);
>> +  Glib::RefPtr<Goocanvas::ItemModel> root = Goocanvas::
GroupModel::
>> create() ;
>> +  m_canvas->set_root_item_model(root) ;
>> +  m_rect = Goocanvas::RectModel::create(10, 10, 60, 60);
>>    root->add_child(m_rect);
>>    m_rect->property_line_width().set_value(10.0);
>>    m_rect->property_stroke_color().set_value("yellow");
>> @@ -74,6 +75,7 @@
>>           ", width=" << m_rect->property_width() << ",  height=" 
<< 
>> m_rect->property_height() << 
>>           ", line_width=" << m_rect->property_line_width() << std::
>> endl;
>>  
>> +  // No bounds are available now, so the following will not 
compile
>>    Goocanvas::Bounds bounds = m_rect->get_bounds();
>>    str << "Item bounds: x1=" << bounds.get_x1() << ", y1=" << 
bounds.
>> get_y1() << ", x2=" << bounds.get_x2() << ", y2=" << bounds.get_y2()
 << 
>> std::endl;
>> 
>> the rectangle is displayed but now its bounds aren't available 
because 
>> the *Model classes do not provide the get_bounds() method. The 
same 
>> happens for the Goocanvas::Ellipse instances.
>
>Hmm, well as far as I can tell, the C *Model classes don't have any
>concept of 'bounds' either.  It seems like bounds is only a view
>property and not available via the model.  So I think you'll need a
>Goocanvas::Rect class (not RectModel) in order to get or set the 
bounds
>of an item.
>-- 
>Jonner
>
>

Gennaro Bellizio





_______________________________________________
Tiscali.Fax: ricevi gratis sulla tua email e invii 
a 12 cent per pagina senza scatto alla risposta
http://vas.tiscali.it/fax//

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to