Bonjour,
Je tente toujours de développer la partie graphique de mon jeu d'échec et j'ai besoin de pouvoir "re dimensionner" à loisir les pièces de l'échiquier.
En regardant du côté de la doc j'ai trouvé des fonctions tout à fait intéressantes au sein de la classe Gdk:: Pixbuf.
J'ai donc déclaré un Gdk:: Pixbuf dans la déclarartion de ma classe:
Et dans mon .cc:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
m_pixbuf.create_from_file("case-blanche.jpg");
Voici la réponse du compilateur:
/home/.../CCaseblanche.cc||In constructor ‘CCaseblanche::CCaseblanche(int, int)’: |
/home/.../CCaseblanche.cc|4|erreur: no matching function for call to ‘Gdk:: Pixbuf:: Pixbuf()’|
/usr/include/gdkmm-2.4/gdkmm/pixbuf.h|399|note: candidats sont: Gdk:: Pixbuf:: Pixbuf(const Glib::RefPtr<Gdk::Image>&, const Glib::RefPtr<Gdk::Colormap>&, int, int, int, int, int, int)|
/usr/include/gdkmm-2.4/gdkmm/pixbuf.h|393|note: Gdk:: Pixbuf:: Pixbuf(const Glib::RefPtr<Gdk::Image>&, int, int, int, int)|
/usr/include/gdkmm-2.4/gdkmm/pixbuf.h|380|note: Gdk:: Pixbuf:: Pixbuf(const Glib::RefPtr<Gdk::Image>&, const Glib::RefPtr<Gdk::Colormap>&, int, int, int, int)|
/usr/include/gdkmm-2.4/gdkmm/pixbuf.h|364|note: Gdk:: Pixbuf:: Pixbuf(const Glib::RefPtr<Gdk:: Drawable>&, const Glib::RefPtr<Gdk::Colormap>&, int, int, int, int, int, int)|
/usr/include/gdkmm-2.4/gdkmm/pixbuf.h|358|note: Gdk:: Pixbuf:: Pixbuf(const Glib::RefPtr<Gdk:: Drawable>&, int, int, int, int)|
/usr/include/gdkmm-2.4/gdkmm/pixbuf.h|345|note: Gdk:: Pixbuf:: Pixbuf(const Glib::RefPtr<Gdk:: Drawable>&, const Glib::RefPtr<Gdk::Colormap>&, int, int, int, int)|
/usr/include/gdkmm-2.4/gdkmm/pixbuf.h|270|note: Gdk:: Pixbuf:: Pixbuf(GdkPixbuf*)|
/usr/include/gdkmm-2.4/gdkmm/pixbuf.h|269|note: Gdk:: Pixbuf:: Pixbuf(const Glib::ConstructParams&)|
/usr/include/gdkmm-2.4/gdkmm/pixbuf.h|265|note: Gdk:: Pixbuf:: Pixbuf(const Gdk:: Pixbuf&)|
||=== Build finished: 1 errors, 0 warnings ===|
Manifestement je ne comprend rien à Gdk.
Quelqu'un pourrait-il m'éclairer de sa lanterne?