RE: :Pixbuf



On Thu, 2005-06-09 at 10:50 +0100, Foster, Gareth wrote:
>   static Glib::RefPtr<Pixbuf> create_from_file(const std::string& filename,
> int width, int height, bool preserve_aspect_ratio = true);
>   _IGNORE(gdk_pixbuf_new_from_file_at_scale,
> gdk_pixbuf_new_from_file_at_size)
> 
> Does that _IGNORE mean that this method is not added to the bindings? If so,
> does anybody know why?

It means that gmmproc should not complain that we have not wrapped it
directly. It usually means that another method provides the same
functionality, often by using that function. In this case, see the
comment in pixbuf.ccg:

Glib::RefPtr<Pixbuf> Pixbuf::create_from_file(const std::string&
filename, int width, int size, bool preserve_aspect_ratio)
{
  GError* error = 0;
  GdkPixbuf *const pixbuf = gdk_pixbuf_new_from_file_at_scale
(filename.c_str(), width, size, preserve_aspect_ratio, &error);
  //gdk_pixbuf_new_from_file_at_size() just calls
gdk_pixbuf_new_from_file_at_scale().

  if(error)
    Glib::Error::throw_exception(error);

  return Glib::wrap(pixbuf);
}


-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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