[gnomemm] [canvas] Setting fill_color to None



In C, you pass a NULL string for fill_color in gnome_canvas_item_set() to
get an unfilled shape. We currently don't offer this: 

class fill_color : public Property<Gdk::Color>
{
public:
  fill_color(const Gdk::Color& v)
  : Property<Gdk::Color>("fill_color_gdk",v)
  {}

  fill_color(const Glib::ustring& v)
  : Property<Gdk::Color>("fill_color",v)
  {}
};

So fill_color("") results in a black shape.
What would be a good API to use here? Maybe in Property<Gdk::Color>, if
the Glib::ustring argument is empty (""), pass 0?
This would also need some hand-tuning in shape.hg -- how hard is it to
create a custom PropertyProxy?

-- 
   .--= ULLA! =---------------------.   `We are not here to give users what
   \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus cactus rulez org =---'
C program elindul.  C program leáll.  C programozó exitál.




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