Concerning libgnomecanvasmm



I want to create Polygon using the Polygon class but I didn't manage to make it. Nothing is drawn.
Here's the code I tried :

      Gnome::Canvas::Points points(3);
     points.gobj()->coords[0] = 50;
        points.gobj()->coords[1] = 50;
        
         points.gobj()->coords[2] = 20;
         points.gobj()->coords[3] = 20;
        
         points.gobj()->coords[4] =80;
         points.gobj()->coords[5] = 10;
        
    Gnome::Canvas::Polygon* poly = manage ( new Gnome::Canvas::Polygon( *root(), points ) );
      poly->property_fill_color() = "black";


Eventually, I get it displayed when using only the C interface of gnomecanvas.

-- 
Yann Normand
Sogeti-Transiciel 


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