Removed the broken --enable-canvas-pixbuf option. Added the stuff
2000-01-16 Federico Mena Quintero <federico@helixcode.com> * configure.in: Removed the broken --enable-canvas-pixbuf option. Added the stuff necessary to substitute the variables in gnomecanvaspixbufConf.sh.in. * gnomecanvaspixbufConf.sh.in: New gnome-config handler for the tiny gnomecanvaspixbuf library. * Makefile.am: Build gnomecanvaspixbufConf.sh. * gdk-pixbuf/Makefile.am: Create a libgnomecanvaspixbuf and only build it if gdk-pixbuf is being built outside of gnome-libs. * doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_render_pixmap_and_mask(). * gdk-pixbuf/gdk-pixbuf-render.c (gdk_pixbuf_render_pixmap_and_mask): Renamed from gdk_pixbuf_render_pixmap(). Do not create the mask if it is not needed, and do not use a clipping mask when rendering the pixmap. Tweaked documentation a little. * HACKING: New file with hacking policies for the gdk-pixbuf module. * doc/Makefile.am (tmpl_sources): Added missing backslash. * doc/Makefile.am: Use gnomecanvaspixbuf in gnome-config when scanning for docstrings. * gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_copy_area): Made sanity checks more stringent. Removed "gint" abominations. Made documentation consistent with the rest of the functions. * doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_copy_area() to the utilities section.
This commit is contained in:

committed by
Arturo Espinosa

parent
ef80871e0a
commit
4f0f733060
@ -9,15 +9,15 @@ DOC_MAIN_SGML_FILE=gdk-pixbuf.sgml
|
|||||||
# The directory containing the source code (if it contains documentation).
|
# The directory containing the source code (if it contains documentation).
|
||||||
DOC_SOURCE_DIR=$(GDK_PIXBUF_DIR)/gdk-pixbuf
|
DOC_SOURCE_DIR=$(GDK_PIXBUF_DIR)/gdk-pixbuf
|
||||||
|
|
||||||
CFLAGS=`gnome-config --cflags gnomeui gdk_pixbuf`
|
CFLAGS=`gnome-config --cflags gnomeui gdk_pixbuf gnomecanvaspixbuf`
|
||||||
LDFLAGS=`gnome-config --libs gnomeui gdk_pixbuf`
|
LDFLAGS=`gnome-config --libs gnomeui gdk_pixbuf gnomecanvaspixbuf`
|
||||||
|
|
||||||
HTML_DIR=$(datadir)/gnome/html
|
HTML_DIR=$(datadir)/gnome/html
|
||||||
|
|
||||||
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
|
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
|
||||||
|
|
||||||
tmpl_sources = \
|
tmpl_sources = \
|
||||||
tmpl/animation.sgml
|
tmpl/animation.sgml \
|
||||||
tmpl/creating.sgml \
|
tmpl/creating.sgml \
|
||||||
tmpl/file-loading.sgml \
|
tmpl/file-loading.sgml \
|
||||||
tmpl/from-drawables.sgml \
|
tmpl/from-drawables.sgml \
|
||||||
|
@ -14,8 +14,7 @@ GdkPixbuf *pixbuf,
|
|||||||
<USER_FUNCTION>
|
<USER_FUNCTION>
|
||||||
<NAME>ModuleFrameDoneNotifyFunc</NAME>
|
<NAME>ModuleFrameDoneNotifyFunc</NAME>
|
||||||
<RETURNS>void </RETURNS>
|
<RETURNS>void </RETURNS>
|
||||||
GdkPixbuf *pixbuf,
|
GdkPixbufFrame *frame,
|
||||||
gint frame,
|
|
||||||
gpointer user_data
|
gpointer user_data
|
||||||
</USER_FUNCTION>
|
</USER_FUNCTION>
|
||||||
<USER_FUNCTION>
|
<USER_FUNCTION>
|
||||||
@ -286,11 +285,21 @@ GdkPixbuf *pixbuf,GdkDrawable *drawable, GdkGC *gc,int src_x, int src_y,int dest
|
|||||||
GdkPixbuf *pixbuf, GdkDrawable *drawable,int src_x, int src_y,int dest_x, int dest_y,int width, int height,GdkPixbufAlphaMode alpha_mode,int alpha_threshold,GdkRgbDither dither,int x_dither, int y_dither
|
GdkPixbuf *pixbuf, GdkDrawable *drawable,int src_x, int src_y,int dest_x, int dest_y,int width, int height,GdkPixbufAlphaMode alpha_mode,int alpha_threshold,GdkRgbDither dither,int x_dither, int y_dither
|
||||||
</FUNCTION>
|
</FUNCTION>
|
||||||
<FUNCTION>
|
<FUNCTION>
|
||||||
|
<NAME>gdk_pixbuf_render_pixmap_and_mask</NAME>
|
||||||
|
<RETURNS>void </RETURNS>
|
||||||
|
GdkPixbuf *pixbuf,GdkPixmap **pixmap_return, GdkBitmap **mask_return,int alpha_threshold
|
||||||
|
</FUNCTION>
|
||||||
|
<FUNCTION>
|
||||||
<NAME>gdk_pixbuf_get_from_drawable</NAME>
|
<NAME>gdk_pixbuf_get_from_drawable</NAME>
|
||||||
<RETURNS>GdkPixbuf *</RETURNS>
|
<RETURNS>GdkPixbuf *</RETURNS>
|
||||||
GdkPixbuf *dest,GdkDrawable *src, GdkColormap *cmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height
|
GdkPixbuf *dest,GdkDrawable *src, GdkColormap *cmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height
|
||||||
</FUNCTION>
|
</FUNCTION>
|
||||||
<FUNCTION>
|
<FUNCTION>
|
||||||
|
<NAME>gdk_pixbuf_copy_area</NAME>
|
||||||
|
<RETURNS>void </RETURNS>
|
||||||
|
GdkPixbuf *src_pixbuf,int src_x, int src_y,int width, int height,GdkPixbuf *dest_pixbuf,int dest_x, int dest_y
|
||||||
|
</FUNCTION>
|
||||||
|
<FUNCTION>
|
||||||
<NAME>gdk_pixbuf_scale</NAME>
|
<NAME>gdk_pixbuf_scale</NAME>
|
||||||
<RETURNS>void </RETURNS>
|
<RETURNS>void </RETURNS>
|
||||||
GdkPixbuf *src,GdkPixbuf *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,ArtFilterLevel filter_level
|
GdkPixbuf *src,GdkPixbuf *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,ArtFilterLevel filter_level
|
||||||
@ -330,6 +339,16 @@ GdkPixbufAnimation *animation
|
|||||||
<RETURNS>void </RETURNS>
|
<RETURNS>void </RETURNS>
|
||||||
GdkPixbufAnimation *animation
|
GdkPixbufAnimation *animation
|
||||||
</FUNCTION>
|
</FUNCTION>
|
||||||
|
<FUNCTION>
|
||||||
|
<NAME>gdk_pixbuf_preinit</NAME>
|
||||||
|
<RETURNS>void </RETURNS>
|
||||||
|
gpointer app, gpointer modinfo
|
||||||
|
</FUNCTION>
|
||||||
|
<FUNCTION>
|
||||||
|
<NAME>gdk_pixbuf_postinit</NAME>
|
||||||
|
<RETURNS>void </RETURNS>
|
||||||
|
gpointer app, gpointer modinfo
|
||||||
|
</FUNCTION>
|
||||||
<MACRO>
|
<MACRO>
|
||||||
<NAME>GNOME_TYPE_CANVAS_PIXBUF</NAME>
|
<NAME>GNOME_TYPE_CANVAS_PIXBUF</NAME>
|
||||||
#define GNOME_TYPE_CANVAS_PIXBUF (gnome_canvas_pixbuf_get_type ())
|
#define GNOME_TYPE_CANVAS_PIXBUF (gnome_canvas_pixbuf_get_type ())
|
||||||
@ -373,3 +392,23 @@ struct GnomeCanvasPixbuf {
|
|||||||
<RETURNS>GtkType </RETURNS>
|
<RETURNS>GtkType </RETURNS>
|
||||||
void
|
void
|
||||||
</FUNCTION>
|
</FUNCTION>
|
||||||
|
<MACRO>
|
||||||
|
<NAME>GDK_PIXBUF_MAJOR</NAME>
|
||||||
|
#define GDK_PIXBUF_MAJOR (0)
|
||||||
|
</MACRO>
|
||||||
|
<MACRO>
|
||||||
|
<NAME>GDK_PIXBUF_MINOR</NAME>
|
||||||
|
#define GDK_PIXBUF_MINOR (4)
|
||||||
|
</MACRO>
|
||||||
|
<MACRO>
|
||||||
|
<NAME>GDK_PIXBUF_MICRO</NAME>
|
||||||
|
#define GDK_PIXBUF_MICRO (0)
|
||||||
|
</MACRO>
|
||||||
|
<MACRO>
|
||||||
|
<NAME>GDK_PIXBUF_VERSION</NAME>
|
||||||
|
#define GDK_PIXBUF_VERSION "0.4.0"
|
||||||
|
</MACRO>
|
||||||
|
<VARIABLE>
|
||||||
|
<NAME>gdk_pixbuf_version</NAME>
|
||||||
|
extern const char *gdk_pixbuf_version;
|
||||||
|
</VARIABLE>
|
||||||
|
@ -38,6 +38,7 @@ GdkPixbufAlphaMode
|
|||||||
gdk_pixbuf_render_to_drawable_alpha
|
gdk_pixbuf_render_to_drawable_alpha
|
||||||
gdk_pixbuf_render_to_drawable
|
gdk_pixbuf_render_to_drawable
|
||||||
gdk_pixbuf_render_threshold_alpha
|
gdk_pixbuf_render_threshold_alpha
|
||||||
|
gdk_pixbuf_render_pixmap_and_mask
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
@ -48,6 +49,7 @@ gdk_pixbuf_get_from_drawable
|
|||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>util</FILE>
|
<FILE>util</FILE>
|
||||||
gdk_pixbuf_add_alpha
|
gdk_pixbuf_add_alpha
|
||||||
|
gdk_pixbuf_copy_area
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</ARG>
|
</ARG>
|
||||||
|
|
||||||
<ARG>
|
<ARG>
|
||||||
<NAME>GnomeCanvasPixbuf::width_pixels</NAME>
|
<NAME>GnomeCanvasPixbuf::width_in_pixels</NAME>
|
||||||
<TYPE>gboolean</TYPE>
|
<TYPE>gboolean</TYPE>
|
||||||
<FLAGS>rw</FLAGS>
|
<FLAGS>rw</FLAGS>
|
||||||
</ARG>
|
</ARG>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</ARG>
|
</ARG>
|
||||||
|
|
||||||
<ARG>
|
<ARG>
|
||||||
<NAME>GnomeCanvasPixbuf::height_pixels</NAME>
|
<NAME>GnomeCanvasPixbuf::height_in_pixels</NAME>
|
||||||
<TYPE>gboolean</TYPE>
|
<TYPE>gboolean</TYPE>
|
||||||
<FLAGS>rw</FLAGS>
|
<FLAGS>rw</FLAGS>
|
||||||
</ARG>
|
</ARG>
|
||||||
@ -53,7 +53,7 @@
|
|||||||
</ARG>
|
</ARG>
|
||||||
|
|
||||||
<ARG>
|
<ARG>
|
||||||
<NAME>GnomeCanvasPixbuf::x_pixels</NAME>
|
<NAME>GnomeCanvasPixbuf::x_in_pixels</NAME>
|
||||||
<TYPE>gboolean</TYPE>
|
<TYPE>gboolean</TYPE>
|
||||||
<FLAGS>rw</FLAGS>
|
<FLAGS>rw</FLAGS>
|
||||||
</ARG>
|
</ARG>
|
||||||
@ -71,7 +71,7 @@
|
|||||||
</ARG>
|
</ARG>
|
||||||
|
|
||||||
<ARG>
|
<ARG>
|
||||||
<NAME>GnomeCanvasPixbuf::y_pixels</NAME>
|
<NAME>GnomeCanvasPixbuf::y_in_pixels</NAME>
|
||||||
<TYPE>gboolean</TYPE>
|
<TYPE>gboolean</TYPE>
|
||||||
<FLAGS>rw</FLAGS>
|
<FLAGS>rw</FLAGS>
|
||||||
</ARG>
|
</ARG>
|
||||||
|
@ -14,6 +14,18 @@ gint arg4
|
|||||||
GdkPixbufLoader *gdkpixbufloader
|
GdkPixbufLoader *gdkpixbufloader
|
||||||
</SIGNAL>
|
</SIGNAL>
|
||||||
|
|
||||||
|
<SIGNAL>
|
||||||
|
<NAME>GdkPixbufLoader::frame-done</NAME>
|
||||||
|
<RETURNS>void</RETURNS>
|
||||||
|
GdkPixbufLoader *gdkpixbufloader
|
||||||
|
</SIGNAL>
|
||||||
|
|
||||||
|
<SIGNAL>
|
||||||
|
<NAME>GdkPixbufLoader::animation-done</NAME>
|
||||||
|
<RETURNS>void</RETURNS>
|
||||||
|
GdkPixbufLoader *gdkpixbufloader
|
||||||
|
</SIGNAL>
|
||||||
|
|
||||||
<SIGNAL>
|
<SIGNAL>
|
||||||
<NAME>GdkPixbufLoader::closed</NAME>
|
<NAME>GdkPixbufLoader::closed</NAME>
|
||||||
<RETURNS>void</RETURNS>
|
<RETURNS>void</RETURNS>
|
||||||
|
@ -54,6 +54,7 @@ Application-driven progressive image loading.
|
|||||||
frames are done.
|
frames are done.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
<!-- ##### SECTION See_Also ##### -->
|
<!-- ##### SECTION See_Also ##### -->
|
||||||
<para>
|
<para>
|
||||||
gdk_pixbuf_new_from_file()
|
gdk_pixbuf_new_from_file()
|
||||||
@ -146,6 +147,20 @@ Application-driven progressive image loading.
|
|||||||
<!-- # Unused Parameters # -->
|
<!-- # Unused Parameters # -->
|
||||||
@loader: Loader which emitted the signal.
|
@loader: Loader which emitted the signal.
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GdkPixbufLoader::frame-done ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gdkpixbufloader: the object which received the signal.
|
||||||
|
|
||||||
|
<!-- ##### SIGNAL GdkPixbufLoader::animation-done ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@gdkpixbufloader: the object which received the signal.
|
||||||
|
|
||||||
<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
|
<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
|
||||||
<para>
|
<para>
|
||||||
This signal is emitted when gdk_pixbuf_loader_close() is called.
|
This signal is emitted when gdk_pixbuf_loader_close() is called.
|
||||||
|
@ -1,14 +1,3 @@
|
|||||||
<!-- ##### ARG GnomeCanvasPixbuf:width_in_pixels ##### -->
|
|
||||||
<para>
|
|
||||||
If this argument is %TRUE, then the width of the pixbuf will be
|
|
||||||
considered to be in pixels, that is, it will not be visually
|
|
||||||
scaled even if the item's affine transformation changes. If this
|
|
||||||
is %FALSE, then the width of the pixbuf will be considered to be
|
|
||||||
in canvas units, and so will be scaled normally by affine
|
|
||||||
transformations. The default is %FALSE.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:See_Also ##### -->
|
<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:See_Also ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
@ -26,12 +15,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### ARG GnomeCanvasPixbuf:height_in_pixels ##### -->
|
<!-- ##### ARG GnomeCanvasPixbuf:height_pixels ##### -->
|
||||||
<para>
|
<para>
|
||||||
Works in the same way as the <link
|
|
||||||
linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
|
</para>
|
||||||
argument. The default is %FALSE.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### STRUCT GdkPixbufModule ##### -->
|
<!-- ##### STRUCT GdkPixbufModule ##### -->
|
||||||
@ -48,19 +35,10 @@
|
|||||||
@stop_load:
|
@stop_load:
|
||||||
@load_increment:
|
@load_increment:
|
||||||
|
|
||||||
<!-- ##### ARG GnomeCanvasPixbuf:y_in_pixels ##### -->
|
<!-- ##### ARG GnomeCanvasPixbuf:y_pixels ##### -->
|
||||||
<para>
|
<para>
|
||||||
Works in the same way as the <link
|
|
||||||
linkend="GnomeCanvasPixbuf--x-in-pixels">x_in_pixels</link>
|
|
||||||
argument. The default is %FALSE.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<!--
|
</para>
|
||||||
Local variables:
|
|
||||||
mode: sgml
|
|
||||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
|
||||||
End:
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:Long_Description ##### -->
|
<!-- ##### SECTION ./tmpl/gdk-pixbuf-io.sgml:Long_Description ##### -->
|
||||||
@ -93,6 +71,12 @@ gdk-pixbuf-io
|
|||||||
@pixbuf:
|
@pixbuf:
|
||||||
@user_data:
|
@user_data:
|
||||||
|
|
||||||
|
<!-- ##### ARG GnomeCanvasPixbuf:x_pixels ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION gdk_pixbuf_get_module ##### -->
|
<!-- ##### FUNCTION gdk_pixbuf_get_module ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
@ -102,14 +86,9 @@ gdk-pixbuf-io
|
|||||||
@size:
|
@size:
|
||||||
@Returns:
|
@Returns:
|
||||||
|
|
||||||
<!-- ##### ARG GnomeCanvasPixbuf:x_in_pixels ##### -->
|
<!-- ##### ARG GnomeCanvasPixbuf:width_pixels ##### -->
|
||||||
<para>
|
<para>
|
||||||
If this argument is %TRUE, the pixbuf's translation with respect
|
|
||||||
to its logical origin in item-relative coordinates will be in
|
</para>
|
||||||
pixels, that is, the visible offset will not change even if the
|
|
||||||
item's affine transformation changes. If it is %FALSE, the
|
|
||||||
pixbuf's translation will be taken to be in canvas units, and thus
|
|
||||||
will change along with the item's affine transformation.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -234,10 +234,15 @@ Canvas item to display #GdkPixbuf images.
|
|||||||
used instead. This argument is %FALSE by default.
|
used instead. This argument is %FALSE by default.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!-- ##### ARG GnomeCanvasPixbuf:width_pixels ##### -->
|
<!-- ##### ARG GnomeCanvasPixbuf:width_in_pixels ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
If this argument is %TRUE, then the width of the pixbuf will be
|
||||||
</para>
|
considered to be in pixels, that is, it will not be visually
|
||||||
|
scaled even if the item's affine transformation changes. If this
|
||||||
|
is %FALSE, then the width of the pixbuf will be considered to be
|
||||||
|
in canvas units, and so will be scaled normally by affine
|
||||||
|
transformations. The default is %FALSE.
|
||||||
|
</para>
|
||||||
|
|
||||||
<!-- ##### ARG GnomeCanvasPixbuf:height ##### -->
|
<!-- ##### ARG GnomeCanvasPixbuf:height ##### -->
|
||||||
<para>
|
<para>
|
||||||
@ -258,10 +263,12 @@ Canvas item to display #GdkPixbuf images.
|
|||||||
The default is %FALSE.
|
The default is %FALSE.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!-- ##### ARG GnomeCanvasPixbuf:height_pixels ##### -->
|
<!-- ##### ARG GnomeCanvasPixbuf:height_in_pixels ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
Works in the same way as the <link
|
||||||
</para>
|
linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
|
||||||
|
argument. The default is %FALSE.
|
||||||
|
</para>
|
||||||
|
|
||||||
<!-- ##### ARG GnomeCanvasPixbuf:x ##### -->
|
<!-- ##### ARG GnomeCanvasPixbuf:x ##### -->
|
||||||
<para>
|
<para>
|
||||||
@ -280,10 +287,15 @@ Canvas item to display #GdkPixbuf images.
|
|||||||
coordinates.
|
coordinates.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!-- ##### ARG GnomeCanvasPixbuf:x_pixels ##### -->
|
<!-- ##### ARG GnomeCanvasPixbuf:x_in_pixels ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
If this argument is %TRUE, the pixbuf's translation with respect
|
||||||
</para>
|
to its logical origin in item-relative coordinates will be in
|
||||||
|
pixels, that is, the visible offset will not change even if the
|
||||||
|
item's affine transformation changes. If it is %FALSE, the
|
||||||
|
pixbuf's translation will be taken to be in canvas units, and thus
|
||||||
|
will change along with the item's affine transformation.
|
||||||
|
</para>
|
||||||
|
|
||||||
<!-- ##### ARG GnomeCanvasPixbuf:y ##### -->
|
<!-- ##### ARG GnomeCanvasPixbuf:y ##### -->
|
||||||
<para>
|
<para>
|
||||||
@ -302,8 +314,17 @@ Canvas item to display #GdkPixbuf images.
|
|||||||
default is %FALSE.
|
default is %FALSE.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<!-- ##### ARG GnomeCanvasPixbuf:y_pixels ##### -->
|
<!-- ##### ARG GnomeCanvasPixbuf:y_in_pixels ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
Works in the same way as the <link
|
||||||
|
linkend="GnomeCanvasPixbuf--x-in-pixels">x_in_pixels</link>
|
||||||
|
argument. The default is %FALSE.
|
||||||
|
</para>
|
||||||
|
|
||||||
</para>
|
<!--
|
||||||
|
Local variables:
|
||||||
|
mode: sgml
|
||||||
|
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||||
|
End:
|
||||||
|
-->
|
||||||
|
|
||||||
|
@ -115,3 +115,14 @@ End:
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gdk_pixbuf_render_pixmap_and_mask ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@pixbuf:
|
||||||
|
@pixmap_return:
|
||||||
|
@mask_return:
|
||||||
|
@alpha_threshold:
|
||||||
|
|
||||||
|
|
||||||
|
@ -152,11 +152,11 @@ expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
|||||||
@check_size:
|
@check_size:
|
||||||
@color1:
|
@color1:
|
||||||
@color2:
|
@color2:
|
||||||
@Returns:
|
@Returns: <!--
|
||||||
|
|
||||||
<!--
|
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
sgml-parent-document: ("../gdk-pixbuf.sgml" "book" "refsect2" "")
|
||||||
End:
|
End:
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,3 +35,18 @@ End:
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION gdk_pixbuf_copy_area ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@src_pixbuf:
|
||||||
|
@src_x:
|
||||||
|
@src_y:
|
||||||
|
@width:
|
||||||
|
@height:
|
||||||
|
@dest_pixbuf:
|
||||||
|
@dest_x:
|
||||||
|
@dest_y:
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,40 @@
|
|||||||
2000-01-15 Federico Mena Quintero <federico@helixcode.com>
|
2000-01-16 Federico Mena Quintero <federico@helixcode.com>
|
||||||
|
|
||||||
|
* configure.in: Removed the broken --enable-canvas-pixbuf option.
|
||||||
|
Added the stuff necessary to substitute the variables in
|
||||||
|
gnomecanvaspixbufConf.sh.in.
|
||||||
|
|
||||||
|
* gnomecanvaspixbufConf.sh.in: New gnome-config handler for the
|
||||||
|
tiny gnomecanvaspixbuf library.
|
||||||
|
|
||||||
|
* Makefile.am: Build gnomecanvaspixbufConf.sh.
|
||||||
|
|
||||||
|
* gdk-pixbuf/Makefile.am: Create a libgnomecanvaspixbuf and only
|
||||||
|
build it if gdk-pixbuf is being built outside of gnome-libs.
|
||||||
|
|
||||||
|
* doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_render_pixmap_and_mask().
|
||||||
|
|
||||||
|
* gdk-pixbuf/gdk-pixbuf-render.c
|
||||||
|
(gdk_pixbuf_render_pixmap_and_mask): Renamed from
|
||||||
|
gdk_pixbuf_render_pixmap(). Do not create the mask if it is not
|
||||||
|
needed, and do not use a clipping mask when rendering the pixmap.
|
||||||
|
Tweaked documentation a little.
|
||||||
|
|
||||||
* HACKING: New file with hacking policies for the gdk-pixbuf
|
* HACKING: New file with hacking policies for the gdk-pixbuf
|
||||||
module.
|
module.
|
||||||
|
|
||||||
|
* doc/Makefile.am (tmpl_sources): Added missing backslash.
|
||||||
|
|
||||||
|
* doc/Makefile.am: Use gnomecanvaspixbuf in gnome-config when
|
||||||
|
scanning for docstrings.
|
||||||
|
|
||||||
|
* gdk-pixbuf/gdk-pixbuf-util.c (gdk_pixbuf_copy_area): Made sanity
|
||||||
|
checks more stringent. Removed "gint" abominations. Made
|
||||||
|
documentation consistent with the rest of the functions.
|
||||||
|
|
||||||
|
* doc/gdk-pixbuf-sections.txt: Added gdk_pixbuf_copy_area() to the
|
||||||
|
utilities section.
|
||||||
|
|
||||||
2000-01-14 Jonathan Blandford <jrb@redhat.com>
|
2000-01-14 Jonathan Blandford <jrb@redhat.com>
|
||||||
|
|
||||||
* gdk-pixbuf/gdk-pixbuf-render.c (gdk_pixbuf_render_pixmap): new
|
* gdk-pixbuf/gdk-pixbuf-render.c (gdk_pixbuf_render_pixmap): new
|
||||||
@ -17,9 +49,14 @@
|
|||||||
|
|
||||||
* configure.in, gdk-pixbuf/Makefile.am: Build a libcanvas_pixbuf.
|
* configure.in, gdk-pixbuf/Makefile.am: Build a libcanvas_pixbuf.
|
||||||
|
|
||||||
* configure.in: Define version macros. Generate gdk-pixbuf/gdk-pixbuf-features.h. Always INSIDE_GNOME.
|
* configure.in: Define version macros. Generate
|
||||||
|
gdk-pixbuf/gdk-pixbuf-features.h. Always INSIDE_GNOME.
|
||||||
|
|
||||||
* gdk-pixbuf/Makefile.am: Add gdk-pixbuf-features.h
|
* gdk-pixbuf/Makefile.am: Add gdk-pixbuf-features.h
|
||||||
* gdk-pixbuf/gdk-pixbuf.c: Add definitions of gdk-pixbuf-features.h declarations, plus some initialization stubs.
|
|
||||||
|
* gdk-pixbuf/gdk-pixbuf.c: Add definitions of
|
||||||
|
gdk-pixbuf-features.h declarations, plus some initialization
|
||||||
|
stubs.
|
||||||
|
|
||||||
2000-01-05 Owen Taylor <otaylor@redhat.com>
|
2000-01-05 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
@ -1,16 +1,21 @@
|
|||||||
SUBDIRS = pixops
|
SUBDIRS = pixops
|
||||||
|
|
||||||
if CANVAS_PIXBUF
|
if INSIDE_GNOME_LIBS
|
||||||
CPLIB=libcanvas_pixbuf.la
|
CANVAS_PIXBUF_LIB =
|
||||||
libcanvas_pixbuf_la_SOURCES=gnome-canvas-pixbuf.c
|
CANVAS_PIXBUF_HEADERFILES =
|
||||||
CANVAS_HEADERFILES=gnome-canvas-pixbuf.h
|
EXTRA_GNOME_LIBS =
|
||||||
else
|
else
|
||||||
CPLIB=
|
CANVAS_PIXBUF_LIB = libgnomecanvaspixbuf.la
|
||||||
CANVAS_HEADERFILES=
|
CANVAS_PIXBUF_HEADERFILES=gnome-canvas-pixbuf.h
|
||||||
|
EXTRA_GNOME_LIBS = $(GNOME_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
lib_LTLIBRARIES = \
|
lib_LTLIBRARIES = \
|
||||||
libgdk_pixbuf.la \
|
libgdk_pixbuf.la \
|
||||||
$(CPLIB)
|
$(CANVAS_PIXBUF_LIB)
|
||||||
|
|
||||||
|
libgnomecanvaspixbuf_la_SOURCES = gnome-canvas-pixbuf.c
|
||||||
|
libgnomecanvaspixbuf_la_LDFLAGS = $(EXTRA_GNOME_LIBS)
|
||||||
|
|
||||||
libexecdir = $(libdir)/gdk-pixbuf/loaders
|
libexecdir = $(libdir)/gdk-pixbuf/loaders
|
||||||
|
|
||||||
@ -58,9 +63,10 @@ INCLUDES = -I$(top_srcdir) -I$(top_builddir) \
|
|||||||
$(GLIB_CFLAGS) $(LIBART_CFLAGS) $(GTK_CFLAGS)
|
$(GLIB_CFLAGS) $(LIBART_CFLAGS) $(GTK_CFLAGS)
|
||||||
AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(libexecdir)\""
|
AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(libexecdir)\""
|
||||||
|
|
||||||
|
if INSIDE_GNOME_LIBS
|
||||||
LDADDS = libgdk_pixbuf.la $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS)
|
LDADDS = libgdk_pixbuf.la $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS)
|
||||||
|
else
|
||||||
if CANVAS_PIXBUF
|
LDADDS = libgdk_pixbuf.la libgnomecanvaspixbuf.la $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if INSIDE_GNOME_LIBS
|
if INSIDE_GNOME_LIBS
|
||||||
@ -81,13 +87,6 @@ GDK_PIXBUF_LIBS = $(LIBART_LIBS) $(GLIB_LIBS) $(GTK_LIBS)
|
|||||||
#
|
#
|
||||||
# The GdkPixBuf library
|
# The GdkPixBuf library
|
||||||
#
|
#
|
||||||
if INSIDE_GNOME_LIBS
|
|
||||||
CANVAS_SOURCEFILES=
|
|
||||||
CANVAS_HEADERFILES=
|
|
||||||
else
|
|
||||||
CANVAS_SOURCEFILES= gnome-canvas-pixbuf.c
|
|
||||||
CANVAS_HEADERFILES= gnome-canvas-pixbuf.h
|
|
||||||
endif
|
|
||||||
|
|
||||||
libgdk_pixbufincludedir = $(includedir)/gdk-pixbuf
|
libgdk_pixbufincludedir = $(includedir)/gdk-pixbuf
|
||||||
|
|
||||||
@ -100,24 +99,16 @@ libgdk_pixbuf_la_SOURCES = \
|
|||||||
gdk-pixbuf-loader.c \
|
gdk-pixbuf-loader.c \
|
||||||
gdk-pixbuf-render.c \
|
gdk-pixbuf-render.c \
|
||||||
gdk-pixbuf-scale.c \
|
gdk-pixbuf-scale.c \
|
||||||
gdk-pixbuf-util.c \
|
gdk-pixbuf-util.c
|
||||||
$(CANVAS_SOURCEFILES)
|
|
||||||
|
|
||||||
if INSIDE_GNOME_LIBS
|
|
||||||
EXTRA_GNOME_LIBS = ""
|
|
||||||
else
|
|
||||||
EXTRA_GNOME_LIBS = $(GNOME_LIBS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
libgdk_pixbuf_la_LDFLAGS = -version-info 1:0:0 $(EXTRA_GNOME_LIBS)
|
libgdk_pixbuf_la_LDFLAGS = -version-info 1:0:0 $(EXTRA_GNOME_LIBS)
|
||||||
libgdk_pixbuf_la_LIBADD = pixops/libpixops.la
|
libgdk_pixbuf_la_LIBADD = pixops/libpixops.la
|
||||||
|
|
||||||
|
|
||||||
libgdk_pixbufinclude_HEADERS = \
|
libgdk_pixbufinclude_HEADERS = \
|
||||||
gdk-pixbuf.h \
|
gdk-pixbuf.h \
|
||||||
gdk-pixbuf-loader.h \
|
gdk-pixbuf-loader.h \
|
||||||
gdk-pixbuf-features.h \
|
gdk-pixbuf-features.h \
|
||||||
$(CANVAS_HEADERFILES)
|
$(CANVAS_PIXBUF_HEADERFILES)
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
gdk-pixbuf-io.h
|
gdk-pixbuf-io.h
|
||||||
|
@ -97,58 +97,47 @@ gdk_pixbuf_add_alpha (GdkPixbuf *pixbuf, gboolean substitute_color, guchar r, gu
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_pixbuf_copy_area:
|
* gdk_pixbuf_copy_area:
|
||||||
* @src_pixbuf: The pixbuf to be copied.
|
* @src_pixbuf: Source pixbuf.
|
||||||
* @src_x: The X coordinate of the upper left corner of the area to copy.
|
* @src_x: Source X coordinate within @src_pixbuf.
|
||||||
* @src_y: The Y coordinate of the upper left corner of the area to copy.
|
* @src_y: Source Y coordinate within @src_pixbuf.
|
||||||
* @width: The width of the area to copy.
|
* @width: Width of the area to copy.
|
||||||
* @height: The height of the area to copy.
|
* @height: Height of the area to copy.
|
||||||
* @dest_pixbuf: The pixbuf to store the copy in.
|
* @dest_pixbuf: Destination pixbuf.
|
||||||
* @dest_x: X coordinate for the upper left corner of the rectangle to draw to in @dest_pixbuf.
|
* @dest_x: X coordinate within @dest_pixbuf.
|
||||||
* @dest_y: Y coordinate for the upper left corner of the rectangle to draw to in @dest_pixbuf.
|
* @dest_y: Y coordinate within @dest_pixbuf.
|
||||||
*
|
*
|
||||||
* Takes a rectangle area beginning at (@src_x, @src_y) @width pixels wide
|
* Copies a rectangular area from @src_pixbuf to @dest_pixbuf. Conversion of
|
||||||
* and @height pixels high from @src_pixbuf and copy it into @dest_pixbuf
|
* pixbuf formats is done automatically.
|
||||||
* at (@dest_x, @dest_y). @dest_pixbuf must already be created and must be
|
|
||||||
* large enough to hold the requested area.
|
|
||||||
*
|
|
||||||
* Return value: void
|
|
||||||
**/
|
**/
|
||||||
void gdk_pixbuf_copy_area(GdkPixbuf *src_pixbuf,
|
void
|
||||||
gint src_x, gint src_y,
|
gdk_pixbuf_copy_area (GdkPixbuf *src_pixbuf,
|
||||||
gint width, gint height,
|
int src_x, int src_y,
|
||||||
|
int width, int height,
|
||||||
GdkPixbuf *dest_pixbuf,
|
GdkPixbuf *dest_pixbuf,
|
||||||
gint dest_x, gint dest_y)
|
int dest_x, int dest_y)
|
||||||
{
|
{
|
||||||
gint src_width, src_height, dest_width, dest_height;
|
ArtPixBuf *src_apb, *dest_apb;
|
||||||
|
|
||||||
/* Ensure that we have a source pixbuf, and that the requested
|
g_return_if_fail (src_pixbuf != NULL);
|
||||||
* area is not larger than that pixbuf.
|
g_return_if_fail (dest_pixbuf != NULL);
|
||||||
*/
|
|
||||||
g_return_if_fail(src_pixbuf != NULL);
|
|
||||||
|
|
||||||
src_width = gdk_pixbuf_get_width(src_pixbuf);
|
src_apb = src_pixbuf->art_pixbuf;
|
||||||
src_height = gdk_pixbuf_get_height(src_pixbuf);
|
dest_apb = dest_pixbuf->art_pixbuf;
|
||||||
|
|
||||||
g_return_if_fail(src_x >= 0 && width <= src_width);
|
g_return_if_fail (src_x >= 0 && src_x + width <= src_apb->width);
|
||||||
g_return_if_fail(src_y >= 0 && height <= src_height);
|
g_return_if_fail (src_y >= 0 && src_y + height <= src_apb->height);
|
||||||
|
|
||||||
/* Ensure that we have a destination pixbuf, and that the
|
g_return_if_fail (dest_x >= 0 && dest_x + width <= dest_apb->width);
|
||||||
* requested area is not larger than that pixbuf.
|
g_return_if_fail (dest_y >= 0 && dest_y + height <= dest_apb->height);
|
||||||
*/
|
|
||||||
g_return_if_fail(dest_pixbuf != NULL);
|
|
||||||
|
|
||||||
dest_width = gdk_pixbuf_get_width(dest_pixbuf);
|
/* This will perform format conversions automatically */
|
||||||
dest_height = gdk_pixbuf_get_height(dest_pixbuf);
|
|
||||||
|
|
||||||
g_return_if_fail(dest_x >= 0 && width <= dest_width);
|
gdk_pixbuf_scale (src_pixbuf,
|
||||||
g_return_if_fail(dest_y >= 0 && height <= dest_height);
|
|
||||||
|
|
||||||
/* Scale 1:1 the source pixbuf into the destination pixbuf. */
|
|
||||||
gdk_pixbuf_scale(src_pixbuf,
|
|
||||||
dest_pixbuf,
|
dest_pixbuf,
|
||||||
dest_x, dest_y,
|
dest_x, dest_y,
|
||||||
width, height,
|
width, height,
|
||||||
(double)(dest_x - src_x),
|
(double) (dest_x - src_x),
|
||||||
(double)(dest_y - src_y),
|
(double) (dest_y - src_y),
|
||||||
1., 1., ART_FILTER_NEAREST);
|
1.0, 1.0,
|
||||||
|
ART_FILTER_NEAREST);
|
||||||
}
|
}
|
||||||
|
@ -147,11 +147,6 @@ void gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf,
|
|||||||
GdkRgbDither dither,
|
GdkRgbDither dither,
|
||||||
int x_dither, int y_dither);
|
int x_dither, int y_dither);
|
||||||
|
|
||||||
void gdk_pixbuf_render_pixmap (GdkPixbuf *pixbuf,
|
|
||||||
GdkPixmap **pixmap,
|
|
||||||
GdkBitmap **mask,
|
|
||||||
gint alpha_threshold);
|
|
||||||
|
|
||||||
void gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, GdkDrawable *drawable,
|
void gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, GdkDrawable *drawable,
|
||||||
int src_x, int src_y,
|
int src_x, int src_y,
|
||||||
int dest_x, int dest_y,
|
int dest_x, int dest_y,
|
||||||
@ -161,6 +156,10 @@ void gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, GdkDrawable *drawab
|
|||||||
GdkRgbDither dither,
|
GdkRgbDither dither,
|
||||||
int x_dither, int y_dither);
|
int x_dither, int y_dither);
|
||||||
|
|
||||||
|
void gdk_pixbuf_render_pixmap_and_mask (GdkPixbuf *pixbuf,
|
||||||
|
GdkPixmap **pixmap_return, GdkBitmap **mask_return,
|
||||||
|
int alpha_threshold);
|
||||||
|
|
||||||
/* Fetching a region from a drawable */
|
/* Fetching a region from a drawable */
|
||||||
GdkPixbuf *gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
|
GdkPixbuf *gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
|
||||||
GdkDrawable *src, GdkColormap *cmap,
|
GdkDrawable *src, GdkColormap *cmap,
|
||||||
@ -168,12 +167,12 @@ GdkPixbuf *gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
|
|||||||
int dest_x, int dest_y,
|
int dest_x, int dest_y,
|
||||||
int width, int height);
|
int width, int height);
|
||||||
|
|
||||||
/* Copy an area of a pixbuf into another one */
|
/* Copy an area of a pixbuf onto another one */
|
||||||
void gdk_pixbuf_copy_area (GdkPixbuf *src_pixbuf,
|
void gdk_pixbuf_copy_area (GdkPixbuf *src_pixbuf,
|
||||||
gint src_x, gint src_y,
|
int src_x, int src_y,
|
||||||
gint width, gint height,
|
int width, int height,
|
||||||
GdkPixbuf *dest_pixbuf,
|
GdkPixbuf *dest_pixbuf,
|
||||||
gint dest_x, gint dest_y);
|
int dest_x, int dest_y);
|
||||||
|
|
||||||
/* Scaling */
|
/* Scaling */
|
||||||
|
|
||||||
|
@ -321,69 +321,49 @@ gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, GdkDrawable *drawable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gdk_pixbuf_render_pixmap:
|
* gdk_pixbuf_render_pixmap_and_mask:
|
||||||
* @pixbuf: A pixbuf
|
* @pixbuf: A pixbuf
|
||||||
* @pixmap: A pointer to a pixmap to fill in.
|
* @pixmap_return: Return value for the created pixmap.
|
||||||
* @mask_retval: A pointer to the mask to be filled in.
|
* @mask_return: Return value for the created mask.
|
||||||
* @alpha_threshold: Specifies the threshold value for opacity
|
* @alpha_threshold: Threshold value for opacity values.
|
||||||
* values if the pixbuf has opacity.
|
|
||||||
*
|
|
||||||
* Generates a #GdkPixmap from a #GdkPixbuf, along with an optional mask. The
|
|
||||||
* alpha threshold can be used to determine how the mask is created, if the
|
|
||||||
* pixbuf has an alpha channel. This function is mainly provided for
|
|
||||||
* compatibility reasons, as you will rarely want a #GdkPixmap.
|
|
||||||
*
|
*
|
||||||
|
* Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
|
||||||
|
* and @mask_return arguments, respectively, and renders a pixbuf and its
|
||||||
|
* corresponding tresholded alpha mask to them. This is merely a convenience
|
||||||
|
* function; applications that need to render pixbufs with dither offsets or to
|
||||||
|
* given drawables should use gdk_pixbuf_render_to_drawable_alpha() or
|
||||||
|
* gdk_pixbuf_render_to_drawable(), and gdk_pixbuf_render_threshold_alpha().
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gdk_pixbuf_render_pixmap (GdkPixbuf *pixbuf,
|
gdk_pixbuf_render_pixmap_and_mask (GdkPixbuf *pixbuf,
|
||||||
GdkPixmap **pixmap,
|
GdkPixmap **pixmap_return, GdkBitmap **mask_return,
|
||||||
GdkBitmap **mask_retval,
|
int alpha_threshold)
|
||||||
gint alpha_threshold)
|
|
||||||
{
|
{
|
||||||
GdkBitmap *mask = NULL;
|
ArtPixBuf *apb;
|
||||||
|
|
||||||
g_return_if_fail(pixbuf != NULL);
|
g_return_if_fail (pixbuf != NULL);
|
||||||
|
|
||||||
/* generate mask */
|
apb = pixbuf->art_pixbuf;
|
||||||
if (gdk_pixbuf_get_has_alpha(pixbuf)) {
|
|
||||||
mask = gdk_pixmap_new(NULL,
|
|
||||||
gdk_pixbuf_get_width(pixbuf),
|
|
||||||
gdk_pixbuf_get_height(pixbuf),
|
|
||||||
1);
|
|
||||||
|
|
||||||
gdk_pixbuf_render_threshold_alpha(pixbuf, mask,
|
if (pixmap_return) {
|
||||||
|
GdkGC *gc;
|
||||||
|
|
||||||
|
*pixmap_return = gdk_pixmap_new (NULL, apb->width, apb->height,
|
||||||
|
gdk_rgb_get_visual ()->depth);
|
||||||
|
gc = gdk_gc_new (*pixmap_return);
|
||||||
|
gdk_pixbuf_render_to_drawable (pixbuf, *pixmap_return, gc,
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
gdk_pixbuf_get_width(pixbuf),
|
apb->width, apb->height,
|
||||||
gdk_pixbuf_get_height(pixbuf),
|
|
||||||
alpha_threshold);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Draw to pixmap */
|
|
||||||
if (pixmap != NULL) {
|
|
||||||
GdkGC* gc;
|
|
||||||
|
|
||||||
*pixmap = gdk_pixmap_new(NULL,
|
|
||||||
gdk_pixbuf_get_width(pixbuf),
|
|
||||||
gdk_pixbuf_get_height(pixbuf),
|
|
||||||
gdk_rgb_get_visual()->depth);
|
|
||||||
|
|
||||||
gc = gdk_gc_new(*pixmap);
|
|
||||||
|
|
||||||
gdk_gc_set_clip_mask(gc, mask);
|
|
||||||
|
|
||||||
gdk_pixbuf_render_to_drawable(pixbuf, *pixmap,
|
|
||||||
gc,
|
|
||||||
0, 0, 0, 0,
|
|
||||||
gdk_pixbuf_get_width(pixbuf),
|
|
||||||
gdk_pixbuf_get_height(pixbuf),
|
|
||||||
GDK_RGB_DITHER_NORMAL,
|
GDK_RGB_DITHER_NORMAL,
|
||||||
0, 0);
|
0, 0);
|
||||||
|
gdk_gc_unref (gc);
|
||||||
gdk_gc_unref(gc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mask_retval)
|
if (mask_return) {
|
||||||
*mask_retval = mask;
|
*mask_return = gdk_pixmap_new (NULL, apb->width, apb->height, 1);
|
||||||
else
|
gdk_pixbuf_render_threshold_alpha (pixbuf, *mask_return,
|
||||||
gdk_bitmap_unref(mask);
|
0, 0, 0, 0,
|
||||||
|
apb->width, apb->height,
|
||||||
|
alpha_threshold);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user