1999-11-04 07:30:04 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
2001-02-12 17:50:13 +00:00
|
|
|
Image Data in Memory
|
1999-11-04 07:30:04 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2001-02-12 17:50:13 +00:00
|
|
|
Creating a pixbuf from image data that is already in memory.
|
1999-11-04 07:30:04 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
2001-02-12 17:50:13 +00:00
|
|
|
<para>
|
|
|
|
The most basic way to create a pixbuf is to wrap an existing pixel
|
|
|
|
buffer with a #GdkPixbuf structure. You can use the
|
|
|
|
gdk_pixbuf_new_from_data() function to do this You need to specify
|
|
|
|
the destroy notification function that will be called when the
|
|
|
|
data buffer needs to be freed; this will happen when a #GdkPixbuf
|
|
|
|
is finalized by the reference counting functions If you have a
|
|
|
|
chunk of static data compiled into your application, you can pass
|
|
|
|
in #NULL as the destroy notification function so that the data
|
|
|
|
will not be freed.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The gdk_pixbuf_new() function can be used as a convenience to
|
|
|
|
create a pixbuf with an empty buffer. This is equivalent to
|
|
|
|
allocating a data buffer using malloc() and then wrapping it with
|
|
|
|
gdk_pixbuf_new_from_data(). The gdk_pixbuf_new() function will
|
|
|
|
compute an optimal rowstride so that rendering can be performed
|
|
|
|
with an efficient algorithm.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
As a special case, you can use the gdk_pixbuf_new_from_xpm_data()
|
|
|
|
function to create a pixbuf from inline XPM image data.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
You can also copy an existing pixbuf with the gdk_pixbuf_copy()
|
|
|
|
function. This is not the same as just doing a gdk_pixbuf_ref()
|
|
|
|
on the old pixbuf; the copy function will actually duplicate the
|
|
|
|
pixel data in memory and create a new #GdkPixbuf structure for it.
|
|
|
|
</para>
|
2000-12-12 07:32:32 +00:00
|
|
|
|
2000-04-13 01:18:41 +00:00
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
2001-02-12 17:50:13 +00:00
|
|
|
<para>
|
|
|
|
gdk_pixbuf_finalize().
|
|
|
|
</para>
|
2000-12-12 07:32:32 +00:00
|
|
|
|
2000-10-29 08:03:34 +00:00
|
|
|
<!-- ##### FUNCTION gdk_pixbuf_new ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@colorspace:
|
|
|
|
@has_alpha:
|
|
|
|
@bits_per_sample:
|
|
|
|
@width:
|
|
|
|
@height:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_pixbuf_new_from_data ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@data:
|
|
|
|
@colorspace:
|
|
|
|
@has_alpha:
|
|
|
|
@bits_per_sample:
|
|
|
|
@width:
|
|
|
|
@height:
|
|
|
|
@rowstride:
|
|
|
|
@destroy_fn:
|
|
|
|
@destroy_fn_data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_pixbuf_new_from_xpm_data ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@data:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gdk_pixbuf_new_from_inline ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@inline_pixbuf:
|
|
|
|
@copy_pixels:
|
|
|
|
@length:
|
|
|
|
@error:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
doh, this was broken beyond believe.
Tue Dec 12 23:46:44 2000 Tim Janik <timj@gtk.org>
* gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.
* gtk/gtkbox.c: change property types from (u)long to (u)int for
::position and ::padding.
* gtk/gtkcontainer.c: make ::border_width an INT property.
* gtk/gtkpacker.c: make ::position an INT property.
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
guard against NULL h/v scrollbars, since this is used at construction
time.
* gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
internal gtk_clist_constructor().
* gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
gtk_ctree_constructor().
* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.
* docs/reference/Makefile.am: fun stuff, disabled docs generation
again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.
* gtk/gtkwidget.[hc]:
removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
and gtk_widget_get().
(gtk_widget_new): use g_object_new_valist().
(gtk_widget_set): use g_object_set_valist().
* gtk/gtkobject.[hc]:
removed gtk_object_arg_get_info(), gtk_object_getv(),
gtk_object_query_args(), gtk_object_newv(),
gtk_object_class_add_signals(),
gtk_object_class_user_signal_new(),
gtk_object_class_user_signal_newv(),
gtk_object_arg_set(), gtk_object_arg_get(),
gtk_object_args_collect(),
gtk_object_default_construct(),
gtk_object_constructed(),
GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
removed nsignals, signals and n_args members from GtkObjectClass.
(gtk_object_new): use g_object_new_valist().
(gtk_object_set): use g_object_set_valist().
(gtk_object_get): use g_object_get_valist().
* gtk/gtkcompat.h: define gtk_object_default_construct().
* gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
g_object_new().
* gtk/*.c: removed gtk_object_class_add_signals() from class_init()
fucntions, cleaned up method assignments (make sure your structures
are setup properly before calling out). removed all GTK_CONSTRUCTED
hacks ;)
2000-12-13 01:34:41 +00:00
|
|
|
<!-- ##### FUNCTION gdk_pixbuf_new_subpixbuf ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@src_pixbuf:
|
|
|
|
@src_x:
|
|
|
|
@src_y:
|
|
|
|
@width:
|
|
|
|
@height:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2000-10-29 08:03:34 +00:00
|
|
|
<!-- ##### FUNCTION gdk_pixbuf_copy ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@pixbuf:
|
2001-02-12 17:50:13 +00:00
|
|
|
@Returns: <!--
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
|
|
|
End:
|
|
|
|
-->
|
2000-10-29 08:03:34 +00:00
|
|
|
|
|
|
|
|