Attach hotspot coordinates to the pixbuf as options "x_hot" and "y_hot".

* io-xpm.c (pixbuf_create_from_xpm):
	* io-xbm.c (gdk_pixbuf__xbm_image_load_real):
	* io-ico.c (DecodeHeader): Attach hotspot coordinates to the
	pixbuf as options "x_hot" and "y_hot".
This commit is contained in:
Matthias Clasen
2002-09-06 21:09:49 +00:00
parent 7830d701ce
commit ab97160067
4 changed files with 40 additions and 2 deletions

View File

@ -295,6 +295,14 @@ gdk_pixbuf__xbm_image_load_real (FILE *f, XBMData *context, GError **error)
return NULL;
}
if (x_hot != -1 && y_hot != -1) {
gchar hot[10];
g_snprintf (hot, 10, "%d", x_hot);
gdk_pixbuf_set_option (pixbuf, "x_hot", hot);
g_snprintf (hot, 10, "%d", y_hot);
gdk_pixbuf_set_option (pixbuf, "y_hot", hot);
}
pixels = gdk_pixbuf_get_pixels (pixbuf);
row_stride = gdk_pixbuf_get_rowstride (pixbuf);