summaryrefslogtreecommitdiff
path: root/science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-11-30 00:21:23 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-11-30 00:21:23 +0000
commitcc64f1b8c3c0efacbf4c79eb93ebd7235db07094 (patch)
tree58ff939474c94b2df0a0c78200bb6a283c146954 /science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c
parentBROKEN on 5.x: Does not compile (diff)
- Update to 0.4.9
Notes
Notes: svn path=/head/; revision=122778
Diffstat (limited to 'science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c')
-rw-r--r--science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c b/science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c
new file mode 100644
index 000000000000..726c749fa42f
--- /dev/null
+++ b/science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c
@@ -0,0 +1,31 @@
+--- libgcpcanvas/gcp-canvas-rich-text.c.orig Mon Nov 29 08:46:09 2004
++++ libgcpcanvas/gcp-canvas-rich-text.c Tue Nov 30 00:19:42 2004
+@@ -1699,9 +1699,10 @@
+ static gboolean
+ request_update(gpointer data)
+ {
++ GnomeCanvasRichTextExt *text;
+ if (!GNOME_IS_CANVAS_RICH_TEXT_EXT (data))
+ return;
+- GnomeCanvasRichTextExt *text = GNOME_CANVAS_RICH_TEXT_EXT(data);
++ text = GNOME_CANVAS_RICH_TEXT_EXT(data);
+
+ gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(text));
+
+@@ -2420,10 +2421,13 @@
+ gnome_canvas_rich_text_ext_ensure_rendered (GnomeCanvasRichTextExt *text)
+ {
+ double x1, y1, x2, y2;
+- get_bounds (text, &x1, &y1, &x2, &y2);
+- int w = (int) (ceil (x2) - floor (x1)) + 1, h = (int) (ceil (y2) - floor (y1)) + 1;
+- GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, w, h);
++ int w, h;
++ GdkPixbuf *pixbuf;
+ GnomeCanvasBuf buf;
++
++ get_bounds (text, &x1, &y1, &x2, &y2);
++ w = (int) (ceil (x2) - floor (x1)) + 1, h = (int) (ceil (y2) - floor (y1)) + 1;
++ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, w, h);
+ buf.buf = gdk_pixbuf_get_pixels (pixbuf);
+ buf.rect.x0 = (int) floor (x1);
+ buf.rect.x1 = (int) ceil (x2);