[evolution/rendering-cleanup: 24/63] gnome-canvas: Remove GnomeCanvasLine
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/rendering-cleanup: 24/63] gnome-canvas: Remove GnomeCanvasLine
- Date: Mon, 18 Oct 2010 18:39:59 +0000 (UTC)
commit 8f9f002ef8634e171a75e99d7d26bd80c37984d5
Author: Benjamin Otte <otte redhat com>
Date: Wed Oct 13 17:08:56 2010 +0200
gnome-canvas: Remove GnomeCanvasLine
It's unused and has an ugly API. We can redo it later if we need it.
libgnomecanvas/Makefile.am | 2 -
libgnomecanvas/gnome-canvas-line.c | 1191 ------------------------------------
libgnomecanvas/gnome-canvas-line.h | 143 -----
libgnomecanvas/gnome-canvas-util.c | 21 +
libgnomecanvas/gnome-canvas-util.h | 3 +
libgnomecanvas/libgnomecanvas.h | 1 -
6 files changed, 24 insertions(+), 1337 deletions(-)
---
diff --git a/libgnomecanvas/Makefile.am b/libgnomecanvas/Makefile.am
index 9c99f10..3a070a7 100644
--- a/libgnomecanvas/Makefile.am
+++ b/libgnomecanvas/Makefile.am
@@ -25,7 +25,6 @@ libgnomecanvasinclude_HEADERS = \
gailcanvaswidgetfactory.h \
gnome-canvas-clipgroup.h \
gnome-canvas-i18n.h \
- gnome-canvas-line.h \
gnome-canvas-path-def.h \
gnome-canvas-pixbuf.h \
gnome-canvas-rect-ellipse.h \
@@ -48,7 +47,6 @@ libgnomecanvas_la_SOURCES = \
gailcanvaswidget.c \
gailcanvaswidgetfactory.c \
gnome-canvas-clipgroup.c \
- gnome-canvas-line.c \
gnome-canvas-path-def.c \
gnome-canvas-pixbuf.c \
gnome-canvas-rect-ellipse.c \
diff --git a/libgnomecanvas/gnome-canvas-util.c b/libgnomecanvas/gnome-canvas-util.c
index 8a21c54..bc6b1ba 100644
--- a/libgnomecanvas/gnome-canvas-util.c
+++ b/libgnomecanvas/gnome-canvas-util.c
@@ -616,3 +616,24 @@ gnome_canvas_cap_gdk_to_art (GdkCapStyle gdk_cap)
return ART_PATH_STROKE_CAP_BUTT; /* shut up the compiler */
}
}
+
+/**
+ * gnome_canvas_cairo_create_scratch:
+ *
+ * Create a scratch #cairo_t. This is useful for measuring purposes or
+ * calling functions like cairo_in_fill().
+ *
+ * Returns: A new cairo_t. Destroy with cairo_destroy() after use.
+ **/
+cairo_t *
+gnome_canvas_cairo_create_scratch (void)
+{
+ cairo_surface_t *surface;
+ cairo_t *cr;
+
+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0);
+ cr = cairo_create (surface);
+ cairo_surface_destroy (surface);
+
+ return cr;
+}
diff --git a/libgnomecanvas/gnome-canvas-util.h b/libgnomecanvas/gnome-canvas-util.h
index 1c43b65..74e112f 100644
--- a/libgnomecanvas/gnome-canvas-util.h
+++ b/libgnomecanvas/gnome-canvas-util.h
@@ -141,6 +141,9 @@ ArtPathStrokeJoinType gnome_canvas_join_gdk_to_art (GdkJoinStyle gdk_join);
/* Convert from GDK line cap specifier to libart. */
ArtPathStrokeCapType gnome_canvas_cap_gdk_to_art (GdkCapStyle gdk_cap);
+/* Create a scratch cairo_t for measuring purposes */
+cairo_t *gnome_canvas_cairo_create_scratch (void);
+
G_END_DECLS
#endif
diff --git a/libgnomecanvas/libgnomecanvas.h b/libgnomecanvas/libgnomecanvas.h
index 8ddd2c5..6dff7de 100644
--- a/libgnomecanvas/libgnomecanvas.h
+++ b/libgnomecanvas/libgnomecanvas.h
@@ -27,7 +27,6 @@
#define LIBGNOMECANVAS_H
#include <libgnomecanvas/gnome-canvas.h>
-#include <libgnomecanvas/gnome-canvas-line.h>
#include <libgnomecanvas/gnome-canvas-text.h>
#include <libgnomecanvas/gnome-canvas-rich-text.h>
#include <libgnomecanvas/gnome-canvas-pixbuf.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]