diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt index b284d0eafc..0fd907b7d2 100644 --- a/docs/reference/gdk/gdk3-sections.txt +++ b/docs/reference/gdk/gdk3-sections.txt @@ -334,8 +334,6 @@ gdk_drawable_get_clip_region gdk_drawable_get_visible_region -gdk_draw_point -gdk_draw_points gdk_draw_rectangle gdk_draw_layout_line gdk_draw_layout_line_with_colors diff --git a/docs/reference/gdk/tmpl/drawing.sgml b/docs/reference/gdk/tmpl/drawing.sgml index 25f5e13a6e..fc5c18f5c6 100644 --- a/docs/reference/gdk/tmpl/drawing.sgml +++ b/docs/reference/gdk/tmpl/drawing.sgml @@ -127,26 +127,6 @@ or a #GdkWindow. @Returns: - - - - -@drawable: -@gc: -@x: -@y: - - - - - - -@drawable: -@gc: -@points: -@n_points: - - diff --git a/gdk/directfb/gdkdrawable-directfb.c b/gdk/directfb/gdkdrawable-directfb.c index e89bdc2e68..238e92e08e 100644 --- a/gdk/directfb/gdkdrawable-directfb.c +++ b/gdk/directfb/gdkdrawable-directfb.c @@ -605,54 +605,6 @@ gdk_directfb_draw_drawable (GdkDrawable *drawable, temp_region_deinit( &clip ); } -static void -gdk_directfb_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints) -{ - GdkDrawableImplDirectFB *impl; - cairo_region_t clip; - - DFBRegion region = { points->x, points->y, points->x, points->y }; - - D_DEBUG_AT( GDKDFB_Drawable, "%s( %p, %p, %p, %d )\n", G_STRFUNC, drawable, gc, points, npoints ); - - if (npoints < 1) - return; - - impl = GDK_DRAWABLE_IMPL_DIRECTFB (drawable); - - if (!gdk_directfb_setup_for_drawing (impl, GDK_GC_DIRECTFB (gc))) - return; - - gdk_directfb_clip_region (drawable, gc, NULL, &clip); - - while (npoints > 0) - { - if (cairo_region_contains_point (&clip, points->x, points->y)) - { - impl->surface->FillRectangle (impl->surface, - points->x, points->y, 1, 1); - - if (points->x < region.x1) - region.x1 = points->x; - if (points->x > region.x2) - region.x2 = points->x; - - if (points->y < region.y1) - region.y1 = points->y; - if (points->y > region.y2) - region.y2 = points->y; - } - - npoints--; - points++; - } - - temp_region_deinit( &clip ); -} - static inline void convert_rgba_pixbuf_to_image (guint32 *src, guint src_pitch, @@ -751,7 +703,6 @@ gdk_drawable_impl_directfb_class_init (GdkDrawableImplDirectFBClass *klass) drawable_class->create_gc = _gdk_directfb_gc_new; drawable_class->draw_rectangle = gdk_directfb_draw_rectangle; drawable_class->draw_drawable = gdk_directfb_draw_drawable; - drawable_class->draw_points = gdk_directfb_draw_points; drawable_class->ref_cairo_surface = gdk_directfb_ref_cairo_surface; drawable_class->set_colormap = gdk_directfb_set_colormap; diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols index e0616c6bb7..1bc019af6d 100644 --- a/gdk/gdk.symbols +++ b/gdk/gdk.symbols @@ -550,8 +550,6 @@ gdk_drawable_get_visible_region gdk_drawable_get_visual gdk_drawable_set_colormap gdk_draw_drawable -gdk_draw_point -gdk_draw_points gdk_draw_rectangle #endif #endif diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c index 832685abe7..1051e44d57 100644 --- a/gdk/gdkdraw.c +++ b/gdk/gdkdraw.c @@ -214,33 +214,6 @@ gdk_drawable_get_colormap (GdkDrawable *drawable) /* Drawing */ -/** - * gdk_draw_point: - * @drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). - * @gc: a #GdkGC. - * @x: the x coordinate of the point. - * @y: the y coordinate of the point. - * - * Draws a point, using the foreground color and other attributes of - * the #GdkGC. - **/ -void -gdk_draw_point (GdkDrawable *drawable, - GdkGC *gc, - gint x, - gint y) -{ - GdkPoint point; - - g_return_if_fail (GDK_IS_DRAWABLE (drawable)); - g_return_if_fail (GDK_IS_GC (gc)); - - point.x = x; - point.y = y; - - GDK_DRAWABLE_GET_CLASS (drawable)->draw_points (drawable, gc, &point, 1); -} - /** * gdk_draw_rectangle: * @drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). @@ -382,34 +355,6 @@ gdk_draw_drawable (GdkDrawable *drawable, g_object_unref (composite); } -/** - * gdk_draw_points: - * @drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap). - * @gc: a #GdkGC. - * @points: an array of #GdkPoint structures. - * @n_points: the number of points to be drawn. - * - * Draws a number of points, using the foreground color and other - * attributes of the #GdkGC. - **/ -void -gdk_draw_points (GdkDrawable *drawable, - GdkGC *gc, - const GdkPoint *points, - gint n_points) -{ - g_return_if_fail (GDK_IS_DRAWABLE (drawable)); - g_return_if_fail ((points != NULL) && (n_points > 0)); - g_return_if_fail (GDK_IS_GC (gc)); - g_return_if_fail (n_points >= 0); - - if (n_points == 0) - return; - - GDK_DRAWABLE_GET_CLASS (drawable)->draw_points (drawable, gc, - (GdkPoint *) points, n_points); -} - static GdkDrawable * gdk_drawable_real_get_composite_drawable (GdkDrawable *drawable, gint x, diff --git a/gdk/gdkdrawable.h b/gdk/gdkdrawable.h index c0d88f2271..de741d3664 100644 --- a/gdk/gdkdrawable.h +++ b/gdk/gdkdrawable.h @@ -76,10 +76,6 @@ struct _GdkDrawableClass gint ydest, gint width, gint height); - void (*draw_points) (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints); gint (*get_depth) (GdkDrawable *drawable); void (*get_size) (GdkDrawable *drawable, @@ -154,10 +150,6 @@ GdkDisplay* gdk_drawable_get_display (GdkDrawable *drawable); /* Drawing */ -void gdk_draw_point (GdkDrawable *drawable, - GdkGC *gc, - gint x, - gint y); void gdk_draw_rectangle (GdkDrawable *drawable, GdkGC *gc, gboolean filled, @@ -174,10 +166,6 @@ void gdk_draw_drawable (GdkDrawable *drawable, gint ydest, gint width, gint height); -void gdk_draw_points (GdkDrawable *drawable, - GdkGC *gc, - const GdkPoint *points, - gint n_points); void gdk_draw_layout_line (GdkDrawable *drawable, GdkGC *gc, diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c index 2ee6f9ec27..d582a08e7a 100644 --- a/gdk/gdkoffscreenwindow.c +++ b/gdk/gdkoffscreenwindow.c @@ -323,43 +323,6 @@ gdk_offscreen_window_draw_rectangle (GdkDrawable *drawable, } -static void -gdk_offscreen_window_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints) -{ - GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable); - GdkDrawable *real_drawable = get_real_drawable (offscreen); - - gdk_draw_points (real_drawable, - gc, - points, - npoints); - - - if (npoints > 0) - { - int min_x, min_y, max_x, max_y, i; - - min_x = max_x = points[0].x; - min_y = max_y = points[0].y; - - for (i = 1; i < npoints; i++) - { - min_x = MIN (min_x, points[i].x); - max_x = MAX (max_x, points[i].x); - min_y = MIN (min_y, points[i].y); - max_y = MAX (max_y, points[i].y); - } - - add_damage (offscreen, min_x, min_y, - max_x - min_x + 1, - max_y - min_y + 1, - FALSE); - } -} - void _gdk_offscreen_window_new (GdkWindow *window, GdkScreen *screen, @@ -986,7 +949,6 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass) drawable_class->draw_rectangle = gdk_offscreen_window_draw_rectangle; drawable_class->draw_drawable_with_src = gdk_offscreen_window_draw_drawable; - drawable_class->draw_points = gdk_offscreen_window_draw_points; } static void diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c index 3df695be29..3d51dad5f1 100644 --- a/gdk/gdkpixmap.c +++ b/gdk/gdkpixmap.c @@ -51,10 +51,6 @@ static void gdk_pixmap_draw_drawable (GdkDrawable *drawable, gint width, gint height, GdkPixmap *original_src); -static void gdk_pixmap_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints); static void gdk_pixmap_real_get_size (GdkDrawable *drawable, gint *width, @@ -115,7 +111,6 @@ gdk_pixmap_class_init (GdkPixmapObjectClass *klass) drawable_class->create_gc = gdk_pixmap_create_gc; drawable_class->draw_rectangle = gdk_pixmap_draw_rectangle; drawable_class->draw_drawable_with_src = gdk_pixmap_draw_drawable; - drawable_class->draw_points = gdk_pixmap_draw_points; drawable_class->get_depth = gdk_pixmap_real_get_depth; drawable_class->get_screen = gdk_pixmap_real_get_screen; drawable_class->get_size = gdk_pixmap_real_get_size; @@ -234,18 +229,6 @@ gdk_pixmap_draw_drawable (GdkDrawable *drawable, original_src); } -static void -gdk_pixmap_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints) -{ - GdkPixmapObject *private = (GdkPixmapObject *)drawable; - - _gdk_gc_remove_drawable_clip (gc); - gdk_draw_points (private->impl, gc, points, npoints); -} - static void gdk_pixmap_real_get_size (GdkDrawable *drawable, gint *width, diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 0178c2dbe3..0554954d3b 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -246,10 +246,6 @@ static void gdk_window_draw_drawable (GdkDrawable *drawable, gint width, gint height, GdkDrawable *original_src); -static void gdk_window_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints); static cairo_surface_t *gdk_window_ref_cairo_surface (GdkDrawable *drawable); static cairo_surface_t *gdk_window_create_cairo_surface (GdkDrawable *drawable, @@ -430,7 +426,6 @@ gdk_window_class_init (GdkWindowObjectClass *klass) drawable_class->create_gc = gdk_window_create_gc; drawable_class->draw_rectangle = gdk_window_draw_rectangle; drawable_class->draw_drawable_with_src = gdk_window_draw_drawable; - drawable_class->draw_points = gdk_window_draw_points; drawable_class->get_depth = gdk_window_real_get_depth; drawable_class->get_screen = gdk_window_real_get_screen; drawable_class->get_size = gdk_window_real_get_size; @@ -4194,41 +4189,6 @@ gdk_window_draw_drawable (GdkDrawable *drawable, END_DRAW; } -static void -gdk_window_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints) -{ - GdkPoint *new_points; - - if (GDK_WINDOW_DESTROYED (drawable)) - return; - - BEGIN_DRAW; - - if (x_offset != 0 || y_offset != 0) - { - gint i; - - new_points = g_new (GdkPoint, npoints); - for (i=0; icreate_gc = _gdk_quartz_gc_new; drawable_class->draw_rectangle = gdk_quartz_draw_rectangle; drawable_class->draw_drawable_with_src = gdk_quartz_draw_drawable; - drawable_class->draw_points = gdk_quartz_draw_points; drawable_class->ref_cairo_surface = gdk_quartz_ref_cairo_surface; diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c index b0a730b061..fae749f5e8 100644 --- a/gdk/win32/gdkdrawable-win32.c +++ b/gdk/win32/gdkdrawable-win32.c @@ -65,10 +65,6 @@ static void gdk_win32_draw_drawable (GdkDrawable *drawable, gint width, gint height, GdkDrawable *original_src); -static void gdk_win32_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints); static cairo_surface_t *gdk_win32_ref_cairo_surface (GdkDrawable *drawable); @@ -101,7 +97,6 @@ _gdk_drawable_impl_win32_class_init (GdkDrawableImplWin32Class *klass) drawable_class->create_gc = _gdk_win32_gc_new; drawable_class->draw_rectangle = gdk_win32_draw_rectangle; drawable_class->draw_drawable_with_src = gdk_win32_draw_drawable; - drawable_class->draw_points = gdk_win32_draw_points; drawable_class->ref_cairo_surface = gdk_win32_ref_cairo_surface; @@ -775,37 +770,6 @@ gdk_win32_draw_drawable (GdkDrawable *drawable, xdest, ydest, width, height); } -static void -gdk_win32_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints) -{ - HDC hdc; - HGDIOBJ old_pen; - int i; - - hdc = gdk_win32_hdc_get (drawable, gc, GDK_GC_FOREGROUND); - - GDK_NOTE (DRAW, g_print ("gdk_win32_draw_points: %s %d points\n", - _gdk_win32_drawable_description (drawable), - npoints)); - - /* The X11 version uses XDrawPoint(), which doesn't use the fill - * mode, so don't use generic_draw. But we should use the current - * function, so we can't use SetPixel(). Draw single-pixel - * rectangles (sigh). - */ - - old_pen = SelectObject (hdc, GetStockObject (NULL_PEN)); - for (i = 0; i < npoints; i++) - Rectangle (hdc, points[i].x, points[i].y, - points[i].x + 2, points[i].y + 2); - - SelectObject (hdc, old_pen); - gdk_win32_hdc_release (drawable, gc, GDK_GC_FOREGROUND); -} - static void blit_from_pixmap (gboolean use_fg_bg, GdkDrawableImplWin32 *dest, diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c index 4261c6f9be..53cd107ed2 100644 --- a/gdk/x11/gdkdrawable-x11.c +++ b/gdk/x11/gdkdrawable-x11.c @@ -65,10 +65,6 @@ static void gdk_x11_draw_drawable (GdkDrawable *drawable, gint width, gint height, GdkDrawable *original_src); -static void gdk_x11_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints); static cairo_surface_t *gdk_x11_ref_cairo_surface (GdkDrawable *drawable); @@ -97,7 +93,6 @@ _gdk_drawable_impl_x11_class_init (GdkDrawableImplX11Class *klass) drawable_class->create_gc = _gdk_x11_gc_new; drawable_class->draw_rectangle = gdk_x11_draw_rectangle; drawable_class->draw_drawable_with_src = gdk_x11_draw_drawable; - drawable_class->draw_points = gdk_x11_draw_points; drawable_class->ref_cairo_surface = gdk_x11_ref_cairo_surface; @@ -400,49 +395,6 @@ gdk_x11_draw_drawable (GdkDrawable *drawable, src_depth, dest_depth); } -static void -gdk_x11_draw_points (GdkDrawable *drawable, - GdkGC *gc, - GdkPoint *points, - gint npoints) -{ - GdkDrawableImplX11 *impl; - - impl = GDK_DRAWABLE_IMPL_X11 (drawable); - - - /* We special-case npoints == 1, because X will merge multiple - * consecutive XDrawPoint requests into a PolyPoint request - */ - if (npoints == 1) - { - XDrawPoint (GDK_SCREEN_XDISPLAY (impl->screen), - impl->xid, - GDK_GC_GET_XGC (gc), - points[0].x, points[0].y); - } - else - { - gint i; - XPoint *tmp_points = g_new (XPoint, npoints); - - for (i=0; iscreen), - impl->xid, - GDK_GC_GET_XGC (gc), - tmp_points, - npoints, - CoordModeOrigin); - - g_free (tmp_points); - } -} - static gint gdk_x11_get_depth (GdkDrawable *drawable) {