Ardour  9.0-pre0-582-g084a23a80d
tk/ydkmm/ydkmm/gdkmm/pixbuf.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GDKMM_PIXBUF_H
4 #define _GDKMM_PIXBUF_H
5 
6 #include <gdkmmconfig.h>
7 
8 
9 #include <glibmm/ustring.h>
10 #include <sigc++/sigc++.h>
11 
12 /* Copyright (C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29  // This is for including the config header before any code (such as
30 // the #ifndef GDKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
31 
32 
33 #include <gdkmm/drawable.h>
34 #include <gdkmm/image.h>
35 #include <gdkmm/pixmap.h>
36 #include <gdkmm/bitmap.h>
37 #include <gdkmm/pixbufformat.h>
38 #include <gdkmm/types.h>
39 #include <giomm/inputstream.h>
40 
41 
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 typedef struct _GdkPixbuf GdkPixbuf;
44 typedef struct _GdkPixbufClass GdkPixbufClass;
45 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
46 
47 
48 #ifndef DOXYGEN_SHOULD_SKIP_THIS
49 namespace Gdk
50 { class Pixbuf_Class; } // namespace Gdk
51 #endif //DOXYGEN_SHOULD_SKIP_THIS
52 
53 namespace Gdk
54 {
55 
56 
64 {
66 };
67 
68 } // namespace Gdk
69 
70 
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
72 namespace Glib
73 {
74 
75 template <>
76 class Value<Gdk::Colorspace> : public Glib::Value_Enum<Gdk::Colorspace>
77 {
78 public:
79  static GType value_type() G_GNUC_CONST;
80 };
81 
82 } // namespace Glib
83 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
84 
85 
86 namespace Gdk
87 {
88 
94 {
99 };
100 
101 } // namespace Gdk
102 
103 
104 #ifndef DOXYGEN_SHOULD_SKIP_THIS
105 namespace Glib
106 {
107 
108 template <>
109 class Value<Gdk::InterpType> : public Glib::Value_Enum<Gdk::InterpType>
110 {
111 public:
112  static GType value_type() G_GNUC_CONST;
113 };
114 
115 } // namespace Glib
116 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
117 
118 
119 namespace Gdk
120 {
121 
127 {
130 };
131 
132 } // namespace Gdk
133 
134 
135 #ifndef DOXYGEN_SHOULD_SKIP_THIS
136 namespace Glib
137 {
138 
139 template <>
140 class Value<Gdk::PixbufAlphaMode> : public Glib::Value_Enum<Gdk::PixbufAlphaMode>
141 {
142 public:
143  static GType value_type() G_GNUC_CONST;
144 };
145 
146 } // namespace Glib
147 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
148 
149 
150 namespace Gdk
151 {
152 
158 {
163 };
164 
165 } // namespace Gdk
166 
167 
168 #ifndef DOXYGEN_SHOULD_SKIP_THIS
169 namespace Glib
170 {
171 
172 template <>
173 class Value<Gdk::PixbufRotation> : public Glib::Value_Enum<Gdk::PixbufRotation>
174 {
175 public:
176  static GType value_type() G_GNUC_CONST;
177 };
178 
179 } // namespace Glib
180 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
181 
182 
183 namespace Gdk
184 {
185 
186 
189 class PixbufError : public Glib::Error
190 {
191 public:
194  enum Code
195  {
201  FAILED
202  };
203 
204  PixbufError(Code error_code, const Glib::ustring& error_message);
205  explicit PixbufError(GError* gobject);
206  Code code() const;
207 
208 #ifndef DOXYGEN_SHOULD_SKIP_THIS
209 private:
210 
211  static void throw_func(GError* gobject);
212 
213  friend void wrap_init(); // uses throw_func()
214 
215  #endif //DOXYGEN_SHOULD_SKIP_THIS
216 };
217 
218 } // namespace Gdk
219 
220 #ifndef DOXYGEN_SHOULD_SKIP_THIS
221 namespace Glib
222 {
223 
224 template <>
225 class Value<Gdk::PixbufError::Code> : public Glib::Value_Enum<Gdk::PixbufError::Code>
226 {
227 public:
228  static GType value_type() G_GNUC_CONST;
229 };
230 
231 } // namespace Glib
232 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
233 
234 
235 namespace Gdk
236 {
237 
238 
239 #ifndef DOXYGEN_SHOULD_SKIP_THIS
240 struct PixbufFormatTraits
241 {
242  typedef PixbufFormat CppType;
243  typedef const GdkPixbufFormat* CType;
244  typedef GdkPixbufFormat* CTypeNonConst;
245 
246  static CType to_c_type (const CppType& obj) { return obj.gobj(); }
247  static CType to_c_type (CType ptr) { return ptr; }
248  static CppType to_cpp_type (CType ptr) { return PixbufFormat(ptr); /* Does not take ownership */ }
249  static void release_c_type (CType /* ptr */) { /* Doesn't happen */ }
250 };
251 #endif //DOXYGEN_SHOULD_SKIP_THIS
252 
253 
254 class Pixbuf : public Glib::Object
255 {
256 
257 #ifndef DOXYGEN_SHOULD_SKIP_THIS
258 
259 public:
260  typedef Pixbuf CppObjectType;
261  typedef Pixbuf_Class CppClassType;
262  typedef GdkPixbuf BaseObjectType;
263  typedef GdkPixbufClass BaseClassType;
264 
265 private: friend class Pixbuf_Class;
266  static CppClassType pixbuf_class_;
267 
268 private:
269  // noncopyable
270  Pixbuf(const Pixbuf&);
271  Pixbuf& operator=(const Pixbuf&);
272 
273 protected:
274  explicit Pixbuf(const Glib::ConstructParams& construct_params);
275  explicit Pixbuf(GdkPixbuf* castitem);
276 
277 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
278 
279 public:
280  virtual ~Pixbuf();
281 
284  static GType get_type() G_GNUC_CONST;
285 
286 #ifndef DOXYGEN_SHOULD_SKIP_THIS
287 
288 
289  static GType get_base_type() G_GNUC_CONST;
290 #endif
291 
293  GdkPixbuf* gobj() { return reinterpret_cast<GdkPixbuf*>(gobject_); }
294 
296  const GdkPixbuf* gobj() const { return reinterpret_cast<GdkPixbuf*>(gobject_); }
297 
299  GdkPixbuf* gobj_copy();
300 
301 private:
302 
303  //gtkmmproc error: gdk_pixbuf_ref : ignored method defs lookup failed//gtkmmproc error: gdk_pixbuf_unref : ignored method defs lookup failed
304 
305 protected:
306 
353  Pixbuf(const Glib::RefPtr<Drawable>& src, const Glib::RefPtr<Colormap>& cmap,
354  int src_x, int src_y, int width, int height);
355 
364  Pixbuf(const Glib::RefPtr<Drawable>& src,
365  int src_x, int src_y, int width, int height);
366 
367  #ifndef GDKMM_DISABLE_DEPRECATED
368 
370  Pixbuf(const Glib::RefPtr<Drawable>& src, const Glib::RefPtr<Colormap>& cmap,
371  int src_x, int src_y, int dest_x, int dest_y, int width, int height);
372  #endif // GDKMM_DISABLE_DEPRECATED
373 
374 
384  Pixbuf(const Glib::RefPtr<Image>& src, const Glib::RefPtr<Colormap>& cmap,
385  int src_x, int src_y, int width, int height);
386 
395  Pixbuf(const Glib::RefPtr<Image>& src,
396  int src_x, int src_y, int width, int height);
397 
398  #ifndef GDKMM_DISABLE_DEPRECATED
399 
401  Pixbuf(const Glib::RefPtr<Image>& src, const Glib::RefPtr<Colormap>& cmap,
402  int src_x, int src_y, int dest_x, int dest_y, int width, int height);
403  #endif // GDKMM_DISABLE_DEPRECATED
404 
405 
406 public:
407  typedef sigc::slot<void, const guint8*> SlotDestroyData;
408 
409  // Hand-coded so the implementation in the .ccg is also only
410  // built when GDKMM_DISABLE_DEPRECATED is defined.
411  #ifndef GDKMM_DISABLE_DEPRECATED
412 
414  static Glib::RefPtr<Gdk::Pixbuf> create(const Glib::RefPtr<Drawable>& src,
415  const Glib::RefPtr<Colormap>& cmap,
416  int src_x, int src_y,
417  int dest_x, int dest_y,
418  int width, int height);
419 
421  static Glib::RefPtr<Gdk::Pixbuf> create(const Glib::RefPtr<Image>& src,
422  const Glib::RefPtr<Colormap>& cmap,
423  int src_x, int src_y,
424  int dest_x, int dest_y,
425  int width, int height);
426  #endif // GDKMM_DISABLE_DEPRECATED
427 
428 
476  static Glib::RefPtr<Pixbuf> create(const Glib::RefPtr<Drawable>& src, const Glib::RefPtr<Colormap>& cmap, int src_x, int src_y, int width, int height);
477 
478 
488  static Glib::RefPtr<Pixbuf> create(const Glib::RefPtr<Drawable>& src, int src_x, int src_y, int width, int height);
489 
490 
501  static Glib::RefPtr<Pixbuf> create(const Glib::RefPtr<Image>& src, const Glib::RefPtr<Colormap>& cmap, int src_x, int src_y, int width, int height);
502 
503 
513  static Glib::RefPtr<Pixbuf> create(const Glib::RefPtr<Image>& src, int src_x, int src_y, int width, int height);
514 
515 
516  Glib::RefPtr<Pixbuf> copy() const;
517 
518 
519  static Glib::RefPtr<Pixbuf> create(Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height);
520 
521 
528  static Glib::RefPtr<Pixbuf> create_subpixbuf(const Glib::RefPtr<Pixbuf>& src_pixbuf, int src_x, int src_y, int width, int height);
529 
530 
537  static Glib::RefPtr<Pixbuf> create_from_file(const std::string& filename);
538 
539 
550  static Glib::RefPtr<Pixbuf> create_from_file(const std::string& filename, int width, int height, bool preserve_aspect_ratio = true);
551  //gdk_pixbuf_new_from_file_at_size() just calls gdk_pixbuf_new_from_file_at_scale().
552 
565  static Glib::RefPtr<Pixbuf> create_from_data(const guint8* data, Colorspace colorspace,
566  bool has_alpha, int bits_per_sample,
567  int width, int height, int rowstride);
568 
583  static Glib::RefPtr<Pixbuf> create_from_data(const guint8* data, Colorspace colorspace,
584  bool has_alpha, int bits_per_sample,
585  int width, int height, int rowstride,
586  const SlotDestroyData& destroy_slot);
587 
588 
589  static Glib::RefPtr<Pixbuf> create_from_xpm_data(const char *const * data);
590 
591 
620  static Glib::RefPtr<Pixbuf> create_from_inline(int data_length, const guint8* data, bool copy_pixels = false);
621 
622 
623  static Glib::RefPtr<Pixbuf> create_from_stream(const Glib::RefPtr<Gio::InputStream>& stream, const Glib::RefPtr<Gio::Cancellable>& cancelable);
624  static Glib::RefPtr<Pixbuf> create_from_stream(const Glib::RefPtr<Gio::InputStream>& stream);
625 
626 
627  static Glib::RefPtr<Pixbuf> create_from_stream_at_scale(const Glib::RefPtr<Gio::InputStream>& stream, int width, int height, bool preserve_aspect_ratio, const Glib::RefPtr<Gio::Cancellable>& cancelable);
628  static Glib::RefPtr<Pixbuf> create_from_stream_at_scale(const Glib::RefPtr<Gio::InputStream>& stream, int width, int height, bool preserve_aspect_ratio);
629 
630 
632 
633 
634  int get_n_channels() const;
635 
636  bool get_has_alpha() const;
637 
638  int get_bits_per_sample() const;
639 
640  guint8* get_pixels() const;
641 
642  int get_width() const;
643 
644  int get_height() const;
645 
646  int get_rowstride() const;
647 
648 
649  void fill(guint32 pixel);
650 
662  void save(const std::string& filename, const Glib::ustring& type);
663 
664 
687  void save(const std::string& filename, const Glib::ustring& type,
688  const Glib::StringArrayHandle& option_keys,
689  const Glib::StringArrayHandle& option_values);
690 
691 
692 /* TODO:
693 typedef gboolean (*GdkPixbufSaveFunc) (const gchar *buf,
694  gsize count,
695  GError **error,
696  gpointer data);
697 
698 gboolean gdk_pixbuf_save_to_callback (GdkPixbuf *pixbuf,
699  GdkPixbufSaveFunc save_func,
700  gpointer user_data,
701  const char *type,
702  GError **error,
703  ...);
704 
705 gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf,
706  GdkPixbufSaveFunc save_func,
707  gpointer user_data,
708  const char *type,
709  char **option_keys,
710  char **option_values,
711  GError **error);
712 
713 */
714 
715  /* Saves the pixbuf to a new buffer in format @a type.
716  * Note that the buffer is not nul-terminated and may contain embedded nulls.
717  * @see save().
718  *
719  * @param buffer This will be set to the address of a new buffer.
720  * @param size This will be set to the size of the @a buffer.
721  * @param type Currently "jpeg", "png", "ico" or "bmp".
722  *
723  * @throw Glib::FileError
724  * @throw Gdk::PixbufError
725  */
726  void save_to_buffer(gchar*& buffer, gsize& buffer_size,
727  const Glib::ustring& type = "png");
728 
729  /* Saves the pixbuf to a new buffer in format @a type.
730  * Note that the buffer is not nul-terminated and may contain embedded nulls.
731  * @see save().
732  *
733  * @param buffer This will be set to the address of a new buffer.
734  * @param size This will be set to the size of the @a buffer.
735  * @param type Currently "jpeg", "png", "ico" or "bmp".
736  *
737  * @throw Glib::FileError
738  * @throw Gdk::PixbufError
739  */
740  void save_to_buffer(gchar*& buffer, gsize& buffer_size,
741  const Glib::ustring& type,
742  const Glib::StringArrayHandle& option_keys,
743  const Glib::StringArrayHandle& option_values);
744 
745 
746  Glib::RefPtr<Gdk::Pixbuf> add_alpha(bool substitute_color, guint8 r, guint8 g, guint8 b) const;
747 
748 
749  void copy_area(int src_x, int src_y, int width, int height, const Glib::RefPtr<Gdk::Pixbuf>& dest_pixbuf, int dest_x, int dest_y) const;
750 
751 
752  void saturate_and_pixelate(const Glib::RefPtr<Gdk::Pixbuf>& dest, float saturation, bool pixelate) const;
753 
754 
755  void scale(const Glib::RefPtr<Gdk::Pixbuf>& dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, InterpType interp_type) const;
756 
757 
758  void composite(const Glib::RefPtr<Gdk::Pixbuf>& dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, InterpType interp_type, int overall_alpha) const;
759 
760 
761  void composite_color(const Glib::RefPtr<Gdk::Pixbuf>& dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, InterpType interp_type, int overall_alpha, int check_x, int check_y, int check_size, guint32 color1, guint32 color2) const;
762 
763 
764  Glib::RefPtr<Gdk::Pixbuf> scale_simple(int dest_width, int dest_height, InterpType interp_type) const;
765 
766 
767  Glib::RefPtr<Gdk::Pixbuf> composite_color_simple(int dest_width, int dest_height, InterpType interp_type, int overall_alpha, int check_size, guint32 color1, guint32 color2) const;
768 
769 
770  Glib::RefPtr<Gdk::Pixbuf> rotate_simple(PixbufRotation angle) const;
771 
772  Glib::RefPtr<Gdk::Pixbuf> flip(bool horizontal = true) const;
773 
774 
789  void render_threshold_alpha(const Glib::RefPtr<Gdk::Bitmap>& bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold);
790 
791 
792 #ifndef GDKMM_DISABLE_DEPRECATED
793 
823  void render_to_drawable(const Glib::RefPtr<Drawable>& drawable, const Glib::RefPtr<Gdk::GC>& gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither);
824 #endif // GDKMM_DISABLE_DEPRECATED
825 
826 
827 #ifndef GDKMM_DISABLE_DEPRECATED
828 
854  void render_to_drawable_alpha(const Glib::RefPtr<Drawable>& drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, PixbufAlphaMode alpha_mode, int alpha_threshold, RgbDither dither, int x_dither, int y_dither);
855 #endif // GDKMM_DISABLE_DEPRECATED
856 
857 
858  void render_pixmap_and_mask_for_colormap(const Glib::RefPtr<Colormap>& colormap,
859  Glib::RefPtr<Pixmap>& pixmap_return,
860  Glib::RefPtr<Bitmap>& mask_return,
861  int alpha_threshold);
862 
863  void render_pixmap_and_mask(Glib::RefPtr<Pixmap>& pixmap_return,
864  Glib::RefPtr<Bitmap>& mask_return, int alpha_threshold);
865 
866 
867  Glib::ustring get_option(const Glib::ustring& key) const;
868 
869 
870  typedef Glib::SListHandle< Glib::RefPtr<PixbufFormat>, PixbufFormatTraits > SListHandle_PixbufFormat;
871 
876 
877 
878 public:
879 
880 public:
881  //C++ methods used to invoke GTK+ virtual functions:
882 
883 protected:
884  //GTK+ Virtual Functions (override these to change behaviour):
885 
886  //Default Signal Handlers::
887 
888 
889 };
890 
891 } // namespace Gdk
892 
893 
894 namespace Glib
895 {
904  Glib::RefPtr<Gdk::Pixbuf> wrap(GdkPixbuf* object, bool take_copy = false);
905 }
906 
907 
908 #endif /* _GDKMM_PIXBUF_H */
909 
Code code() const
PixbufError(GError *gobject)
PixbufError(Code error_code, const Glib::ustring &error_message)
Glib::RefPtr< Gdk::Pixbuf > wrap(GdkPixbuf *object, bool take_copy=false)
void save_to_buffer(gchar *&buffer, gsize &buffer_size, const Glib::ustring &type, const Glib::StringArrayHandle &option_keys, const Glib::StringArrayHandle &option_values)
sigc::slot< void, const guint8 * > SlotDestroyData
void render_pixmap_and_mask(Glib::RefPtr< Pixmap > &pixmap_return, Glib::RefPtr< Bitmap > &mask_return, int alpha_threshold)
GdkPixbuf * gobj()
Provides access to the underlying C GObject.
void fill(guint32 pixel)
Glib::RefPtr< Gdk::Pixbuf > composite_color_simple(int dest_width, int dest_height, InterpType interp_type, int overall_alpha, int check_size, guint32 color1, guint32 color2) const
Glib::RefPtr< Gdk::Pixbuf > rotate_simple(PixbufRotation angle) const
void render_to_drawable_alpha(const Glib::RefPtr< Drawable > &drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, PixbufAlphaMode alpha_mode, int alpha_threshold, RgbDither dither, int x_dither, int y_dither)
static Glib::RefPtr< Pixbuf > create_from_file(const std::string &filename)
virtual ~Pixbuf()
static GType get_type() G_GNUC_CONST
Pixbuf(const Glib::RefPtr< Drawable > &src, const Glib::RefPtr< Colormap > &cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
int get_height() const
static Glib::RefPtr< Pixbuf > create_subpixbuf(const Glib::RefPtr< Pixbuf > &src_pixbuf, int src_x, int src_y, int width, int height)
void saturate_and_pixelate(const Glib::RefPtr< Gdk::Pixbuf > &dest, float saturation, bool pixelate) const
Pixbuf(const Glib::RefPtr< Image > &src, const Glib::RefPtr< Colormap > &cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
void scale(const Glib::RefPtr< Gdk::Pixbuf > &dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, InterpType interp_type) const
static Glib::RefPtr< Pixbuf > create(const Glib::RefPtr< Drawable > &src, int src_x, int src_y, int width, int height)
int get_rowstride() const
int get_width() const
static Glib::RefPtr< Pixbuf > create_from_file(const std::string &filename, int width, int height, bool preserve_aspect_ratio=true)
static Glib::RefPtr< Gdk::Pixbuf > create(const Glib::RefPtr< Drawable > &src, const Glib::RefPtr< Colormap > &cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
static Glib::RefPtr< Pixbuf > create_from_data(const guint8 *data, Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, const SlotDestroyData &destroy_slot)
Pixbuf(const Glib::RefPtr< Image > &src, const Glib::RefPtr< Colormap > &cmap, int src_x, int src_y, int width, int height)
static Glib::RefPtr< Pixbuf > create(const Glib::RefPtr< Drawable > &src, const Glib::RefPtr< Colormap > &cmap, int src_x, int src_y, int width, int height)
static Glib::RefPtr< Pixbuf > create_from_stream(const Glib::RefPtr< Gio::InputStream > &stream, const Glib::RefPtr< Gio::Cancellable > &cancelable)
Glib::RefPtr< Gdk::Pixbuf > scale_simple(int dest_width, int dest_height, InterpType interp_type) const
static Glib::RefPtr< Gdk::Pixbuf > create(const Glib::RefPtr< Image > &src, const Glib::RefPtr< Colormap > &cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
void copy_area(int src_x, int src_y, int width, int height, const Glib::RefPtr< Gdk::Pixbuf > &dest_pixbuf, int dest_x, int dest_y) const
static Glib::RefPtr< Pixbuf > create_from_data(const guint8 *data, Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride)
static Glib::RefPtr< Pixbuf > create(Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height)
const GdkPixbuf * gobj() const
Provides access to the underlying C GObject.
int get_n_channels() const
static Glib::RefPtr< Pixbuf > create(const Glib::RefPtr< Image > &src, const Glib::RefPtr< Colormap > &cmap, int src_x, int src_y, int width, int height)
void save(const std::string &filename, const Glib::ustring &type, const Glib::StringArrayHandle &option_keys, const Glib::StringArrayHandle &option_values)
static Glib::RefPtr< Pixbuf > create_from_stream_at_scale(const Glib::RefPtr< Gio::InputStream > &stream, int width, int height, bool preserve_aspect_ratio)
static SListHandle_PixbufFormat get_formats()
Glib::RefPtr< Pixbuf > copy() const
void render_to_drawable(const Glib::RefPtr< Drawable > &drawable, const Glib::RefPtr< Gdk::GC > &gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither)
static Glib::RefPtr< Pixbuf > create_from_inline(int data_length, const guint8 *data, bool copy_pixels=false)
Pixbuf(const Glib::RefPtr< Drawable > &src, int src_x, int src_y, int width, int height)
Pixbuf(const Glib::RefPtr< Drawable > &src, const Glib::RefPtr< Colormap > &cmap, int src_x, int src_y, int width, int height)
GdkPixbuf * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
int get_bits_per_sample() const
void save_to_buffer(gchar *&buffer, gsize &buffer_size, const Glib::ustring &type="png")
static Glib::RefPtr< Pixbuf > create_from_xpm_data(const char *const *data)
void save(const std::string &filename, const Glib::ustring &type)
Glib::RefPtr< Gdk::Pixbuf > add_alpha(bool substitute_color, guint8 r, guint8 g, guint8 b) const
static Glib::RefPtr< Pixbuf > create_from_stream_at_scale(const Glib::RefPtr< Gio::InputStream > &stream, int width, int height, bool preserve_aspect_ratio, const Glib::RefPtr< Gio::Cancellable > &cancelable)
bool get_has_alpha() const
void composite_color(const Glib::RefPtr< Gdk::Pixbuf > &dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, InterpType interp_type, int overall_alpha, int check_x, int check_y, int check_size, guint32 color1, guint32 color2) const
Glib::RefPtr< Gdk::Pixbuf > flip(bool horizontal=true) const
void render_threshold_alpha(const Glib::RefPtr< Gdk::Bitmap > &bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold)
void composite(const Glib::RefPtr< Gdk::Pixbuf > &dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, InterpType interp_type, int overall_alpha) const
static Glib::RefPtr< Pixbuf > create(const Glib::RefPtr< Image > &src, int src_x, int src_y, int width, int height)
static Glib::RefPtr< Pixbuf > create_from_stream(const Glib::RefPtr< Gio::InputStream > &stream)
guint8 * get_pixels() const
Glib::ustring get_option(const Glib::ustring &key) const
Pixbuf(const Glib::RefPtr< Image > &src, int src_x, int src_y, int width, int height)
Glib::SListHandle< Glib::RefPtr< PixbufFormat >, PixbufFormatTraits > SListHandle_PixbufFormat
Colorspace get_colorspace() const
void render_pixmap_and_mask_for_colormap(const Glib::RefPtr< Colormap > &colormap, Glib::RefPtr< Pixmap > &pixmap_return, Glib::RefPtr< Bitmap > &mask_return, int alpha_threshold)
RgbDither
Definition: drawable.h:64
void wrap_init()
Definition: lobject.h:100
gint height
Definition: xcursors.h:1
gint width
Definition: xcursors.h:1