summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-04-26 11:37:30 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-04-30 18:11:40 +0100
commit822788e2ad6a9ec18c3f0f97fcc2b788dd23d7a5 (patch)
tree26f1327c7db17fd07ce44b4edcb1b1e26b4c28fc
parent4d66cb0d55dc53407a4d9b19f128a6a2f4d23253 (diff)
downloadgdk-pixbuf-822788e2ad6a9ec18c3f0f97fcc2b788dd23d7a5.tar.gz
docs: Remove an outdated example
The "handling an expose event" example is badly outdated, referencing concepts and practices that were deprecated halfway through the GTK 2.x development. These days, it's going to confuse people more than help them.
-rw-r--r--gdk-pixbuf/gdk-pixbuf-scale.c43
1 files changed, 3 insertions, 40 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-scale.c b/gdk-pixbuf/gdk-pixbuf-scale.c
index e9c244ec6..84e8e10c3 100644
--- a/gdk-pixbuf/gdk-pixbuf-scale.c
+++ b/gdk-pixbuf/gdk-pixbuf-scale.c
@@ -29,7 +29,6 @@
* SECTION:scaling
* @Short_description: Scaling pixbufs and scaling and alpha blending pixbufs
* @Title: Scaling
- * @See_also: <link linkend="gdk-GdkRGB">GdkRGB</link>.
*
* The GdkPixBuf contains functions to scale pixbufs, to scale
* pixbufs and alpha blend against an existing image, and to scale
@@ -59,49 +58,13 @@
* setting the `GDK_DISABLE_MEDIALIB` environment variable.
*
* The alpha blending function used is:
- * |[
+ *
+ * |[<!-- language="plain" -->
* Cd = CsĀ·As + Cd(1-As)
* ]|
+ *
* where `Cd` is the destination pixel color, `Cs` is the source pixel color,
* and `As` is the source pixel alpha.
- *
- * The following example demonstrates handling an expose event by
- * rendering the appropriate area of a source image (which is scaled
- * to fit the widget) onto the widget's window. The source image is
- * rendered against a checkerboard, which provides a visual
- * representation of the alpha channel if the image has one. If the
- * image doesn't have an alpha channel, calling
- * gdk_pixbuf_composite_color() function has exactly the same effect
- * as calling gdk_pixbuf_scale().
- *
- * ## Handling an expose event
- *
- * |[
- * gboolean
- * expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data)
- * {
- * GdkPixbuf *dest;
- *
- * dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, event->area.width, event->area.height);
- *
- * gdk_pixbuf_composite_color (pixbuf, dest,
- * 0, 0, event->area.width, event->area.height,
- * -event->area.x, -event->area.y,
- * (double) widget->allocation.width / gdk_pixbuf_get_width (pixbuf),
- * (double) widget->allocation.height / gdk_pixbuf_get_height (pixbuf),
- * GDK_INTERP_BILINEAR, 255,
- * event->area.x, event->area.y, 16, 0xaaaaaa, 0x555555);
- *
- * gdk_draw_pixbuf (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL], dest,
- * 0, 0, event->area.x, event->area.y,
- * event->area.width, event->area.height,
- * GDK_RGB_DITHER_NORMAL, event->area.x, event->area.y);
- *
- * gdk_pixbuf_unref (dest);
- *
- * return TRUE;
- * }
- * ]|
*/