aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas/gnome-canvas.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgnomecanvas/gnome-canvas.c')
-rw-r--r--libgnomecanvas/gnome-canvas.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c
index 758a7ee728..92cd664a96 100644
--- a/libgnomecanvas/gnome-canvas.c
+++ b/libgnomecanvas/gnome-canvas.c
@@ -3455,75 +3455,6 @@ gnome_canvas_world_to_window (GnomeCanvas *canvas, gdouble worldx, gdouble world
*winy = (canvas->pixels_per_unit)*(worldy - canvas->scroll_y1) + canvas->zoom_yofs;
}
-/**
- * gnome_canvas_get_color:
- * @canvas: A canvas.
- * @spec: X color specification, or NULL for "transparent".
- * @color: Returns the allocated color.
- *
- * Allocates a color based on the specified X color specification. As a
- * convenience to item implementations, it returns TRUE if the color was
- * allocated, or FALSE if the specification was NULL. A NULL color
- * specification is considered as "transparent" by the canvas.
- *
- * Return value: TRUE if @spec is non-NULL and the color is allocated. If @spec
- * is NULL, then returns FALSE.
- **/
-gint
-gnome_canvas_get_color (GnomeCanvas *canvas, const gchar *spec, GdkColor *color)
-{
- GdkColormap *colormap;
-
- g_return_val_if_fail (GNOME_IS_CANVAS (canvas), FALSE);
- g_return_val_if_fail (color != NULL, FALSE);
-
- if (!spec) {
- color->pixel = 0;
- color->red = 0;
- color->green = 0;
- color->blue = 0;
- return FALSE;
- }
-
- gdk_color_parse (spec, color);
-
- colormap = gtk_widget_get_colormap (GTK_WIDGET (canvas));
-
- gdk_rgb_find_color (colormap, color);
-
- return TRUE;
-}
-
-/**
- * gnome_canvas_get_color_pixel:
- * @canvas: A canvas.
- * @rgba: RGBA color specification.
- *
- * Allocates a color from the RGBA value passed into this function. The alpha
- * opacity value is discarded, since normal X colors do not support it.
- *
- * Return value: Allocated pixel value corresponding to the specified color.
- **/
-gulong
-gnome_canvas_get_color_pixel (GnomeCanvas *canvas, guint rgba)
-{
- GdkColormap *colormap;
- GdkColor color;
-
- g_return_val_if_fail (GNOME_IS_CANVAS (canvas), 0);
-
- color.red = ((rgba & 0xff000000) >> 16) + ((rgba & 0xff000000) >> 24);
- color.green = ((rgba & 0x00ff0000) >> 8) + ((rgba & 0x00ff0000) >> 16);
- color.blue = (rgba & 0x0000ff00) + ((rgba & 0x0000ff00) >> 8);
- color.pixel = 0;
-
- colormap = gtk_widget_get_colormap (GTK_WIDGET (canvas));
-
- gdk_rgb_find_color (colormap, &color);
-
- return color.pixel;
-}
-
static gboolean
boolean_handled_accumulator (GSignalInvocationHint *ihint,
GValue *return_accu,