[gtk+/rendering-cleanup: 42/113] API: remove gdk_draw_arc()



commit 44506638479c435334753b613409750cf8ca253a
Author: Benjamin Otte <otte redhat com>
Date:   Wed Jul 14 14:07:21 2010 +0200

    API: remove gdk_draw_arc()

 docs/reference/gdk/gdk3-sections.txt        |    1 -
 docs/reference/gdk/tmpl/drawing.sgml        |   15 ----
 docs/reference/gtk/tmpl/gtkdrawingarea.sgml |   13 ++-
 gdk/directfb/gdkdrawable-directfb.c         |   15 ----
 gdk/gdk.symbols                             |    1 -
 gdk/gdkdraw.c                               |   49 ------------
 gdk/gdkdrawable.h                           |   18 -----
 gdk/gdkoffscreenwindow.c                    |   27 -------
 gdk/gdkpixmap.c                             |   29 -------
 gdk/gdkwindow.c                             |   31 --------
 gdk/quartz/gdkdrawable-quartz.c             |   75 ------------------
 gdk/win32/gdkdrawable-win32.c               |  108 ---------------------------
 gdk/x11/gdkdrawable-x11.c                   |   34 ---------
 13 files changed, 8 insertions(+), 408 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index 7fc0d5a..ba398c1 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -340,7 +340,6 @@ gdk_draw_lines
 gdk_draw_segments
 GdkSegment
 gdk_draw_rectangle
-gdk_draw_arc
 gdk_draw_polygon
 gdk_draw_trapezoids
 GdkTrapezoid
diff --git a/docs/reference/gdk/tmpl/drawing.sgml b/docs/reference/gdk/tmpl/drawing.sgml
index 20f89ef..1ada3dd 100644
--- a/docs/reference/gdk/tmpl/drawing.sgml
+++ b/docs/reference/gdk/tmpl/drawing.sgml
@@ -208,21 +208,6 @@ function.
 @height: 
 
 
-<!-- ##### FUNCTION gdk_draw_arc ##### -->
-<para>
-</para>
-
- drawable: 
- gc: 
- filled: 
- x: 
- y: 
- width: 
- height: 
- angle1: 
- angle2: 
-
-
 <!-- ##### FUNCTION gdk_draw_polygon ##### -->
 <para>
 </para>
diff --git a/docs/reference/gtk/tmpl/gtkdrawingarea.sgml b/docs/reference/gtk/tmpl/gtkdrawingarea.sgml
index 1edf19d..2ec329c 100644
--- a/docs/reference/gtk/tmpl/gtkdrawingarea.sgml
+++ b/docs/reference/gtk/tmpl/gtkdrawingarea.sgml
@@ -55,11 +55,14 @@ that drawing is implicitly clipped to the exposed area.
 gboolean
 expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
 {
-  gdk_draw_arc (widget->window,
-                widget->style->fg_gc[gtk_widget_get_state (widget)],
-                TRUE,
-                0, 0, widget->allocation.width, widget->allocation.height,
-                0, 64 * 360);
+  cairo_t *cr;
+  
+  cr = gdk_cairo_create (event->window);
+
+  cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
+  cairo_paint (cr);
+
+  cairo_destroy (cr);
  
   return TRUE;
 }
diff --git a/gdk/directfb/gdkdrawable-directfb.c b/gdk/directfb/gdkdrawable-directfb.c
index 167d51a..d3f55f7 100644
--- a/gdk/directfb/gdkdrawable-directfb.c
+++ b/gdk/directfb/gdkdrawable-directfb.c
@@ -554,20 +554,6 @@ gdk_directfb_draw_rectangle (GdkDrawable *drawable,
 }
 
 static void
-gdk_directfb_draw_arc (GdkDrawable *drawable,
-                       GdkGC       *gc,
-                       gint         filled,
-                       gint         x,
-                       gint         y,
-                       gint         width,
-                       gint         height,
-                       gint         angle1,
-                       gint         angle2)
-{
-  D_UNIMPLEMENTED();
-}
-
-static void
 gdk_directfb_draw_polygon (GdkDrawable *drawable,
                            GdkGC       *gc,
                            gint         filled,
@@ -987,7 +973,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_arc       = gdk_directfb_draw_arc;
   drawable_class->draw_polygon   = gdk_directfb_draw_polygon;
   drawable_class->draw_drawable  = gdk_directfb_draw_drawable;
   drawable_class->draw_points    = gdk_directfb_draw_points;
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index b7ae65d..0becb4a 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -547,7 +547,6 @@ gdk_drawable_get_type G_GNUC_CONST
 gdk_drawable_get_visible_region
 gdk_drawable_get_visual
 gdk_drawable_set_colormap
-gdk_draw_arc
 gdk_draw_drawable
 gdk_draw_glyphs
 gdk_draw_glyphs_transformed
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index f708eb4..13c5f3e 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -325,55 +325,6 @@ gdk_draw_rectangle (GdkDrawable *drawable,
 }
 
 /**
- * gdk_draw_arc:
- * @drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
- * @gc: a #GdkGC.
- * @filled: %TRUE if the arc should be filled, producing a 'pie slice'.
- * @x: the x coordinate of the left edge of the bounding rectangle.
- * @y: the y coordinate of the top edge of the bounding rectangle.
- * @width: the width of the bounding rectangle.
- * @height: the height of the bounding rectangle.
- * @angle1: the start angle of the arc, relative to the 3 o'clock position,
- *     counter-clockwise, in 1/64ths of a degree.
- * @angle2: the end angle of the arc, relative to @angle1, in 1/64ths 
- *     of a degree.
- * 
- * Draws an arc or a filled 'pie slice'. The arc is defined by the bounding
- * rectangle of the entire ellipse, and the start and end angles of the part 
- * of the ellipse to be drawn.
- **/
-void
-gdk_draw_arc (GdkDrawable *drawable,
-	      GdkGC       *gc,
-	      gboolean     filled,
-	      gint         x,
-	      gint         y,
-	      gint         width,
-	      gint         height,
-	      gint         angle1,
-	      gint         angle2)
-{  
-  g_return_if_fail (GDK_IS_DRAWABLE (drawable));
-  g_return_if_fail (GDK_IS_GC (gc));
-
-  if (width < 0 || height < 0)
-    {
-      gint real_width;
-      gint real_height;
-      
-      gdk_drawable_get_size (drawable, &real_width, &real_height);
-
-      if (width < 0)
-        width = real_width;
-      if (height < 0)
-        height = real_height;
-    }
-
-  GDK_DRAWABLE_GET_CLASS (drawable)->draw_arc (drawable, gc, filled,
-                                               x, y, width, height, angle1, angle2);
-}
-
-/**
  * gdk_draw_polygon:
  * @drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
  * @gc: a #GdkGC.
diff --git a/gdk/gdkdrawable.h b/gdk/gdkdrawable.h
index fcad892..84a981e 100644
--- a/gdk/gdkdrawable.h
+++ b/gdk/gdkdrawable.h
@@ -68,15 +68,6 @@ struct _GdkDrawableClass
 			  gint		y,
 			  gint		width,
 			  gint		height);
-  void (*draw_arc)       (GdkDrawable  *drawable,
-			  GdkGC	       *gc,
-			  gboolean	filled,
-			  gint		x,
-			  gint		y,
-			  gint		width,
-			  gint		height,
-			  gint		angle1,
-			  gint		angle2);
   void (*draw_polygon)   (GdkDrawable  *drawable,
 			  GdkGC	       *gc,
 			  gboolean	filled,
@@ -218,15 +209,6 @@ void gdk_draw_rectangle (GdkDrawable      *drawable,
 			 gint              y,
 			 gint              width,
 			 gint              height);
-void gdk_draw_arc       (GdkDrawable      *drawable,
-			 GdkGC            *gc,
-			 gboolean          filled,
-			 gint              x,
-			 gint              y,
-			 gint              width,
-			 gint              height,
-			 gint              angle1,
-			 gint              angle2);
 void gdk_draw_polygon   (GdkDrawable      *drawable,
 			 GdkGC            *gc,
 			 gboolean          filled,
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index 689093e..c0047b7 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -324,32 +324,6 @@ gdk_offscreen_window_draw_rectangle (GdkDrawable  *drawable,
 }
 
 static void
-gdk_offscreen_window_draw_arc (GdkDrawable  *drawable,
-			       GdkGC	       *gc,
-			       gboolean	filled,
-			       gint		x,
-			       gint		y,
-			       gint		width,
-			       gint		height,
-			       gint		angle1,
-			       gint		angle2)
-{
-  GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
-  GdkDrawable *real_drawable = get_real_drawable (offscreen);
-
-  gdk_draw_arc (real_drawable,
-		gc,
-		filled,
-		x,
-		y,
-		width,
-		height,
-		angle1,
-		angle2);
-  add_damage (offscreen, x, y, width, height, !filled);
-}
-
-static void
 gdk_offscreen_window_draw_polygon (GdkDrawable  *drawable,
 				   GdkGC	       *gc,
 				   gboolean	filled,
@@ -1110,7 +1084,6 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
   drawable_class->get_composite_drawable = gdk_offscreen_window_get_composite_drawable;
 
   drawable_class->draw_rectangle = gdk_offscreen_window_draw_rectangle;
-  drawable_class->draw_arc = gdk_offscreen_window_draw_arc;
   drawable_class->draw_polygon = gdk_offscreen_window_draw_polygon;
   drawable_class->draw_drawable_with_src = gdk_offscreen_window_draw_drawable;
   drawable_class->draw_points = gdk_offscreen_window_draw_points;
diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c
index 1891329..264e371 100644
--- a/gdk/gdkpixmap.c
+++ b/gdk/gdkpixmap.c
@@ -41,15 +41,6 @@ static void   gdk_pixmap_draw_rectangle (GdkDrawable     *drawable,
 					 gint             y,
 					 gint             width,
 					 gint             height);
-static void   gdk_pixmap_draw_arc       (GdkDrawable     *drawable,
-					 GdkGC           *gc,
-					 gboolean         filled,
-					 gint             x,
-					 gint             y,
-					 gint             width,
-					 gint             height,
-					 gint             angle1,
-					 gint             angle2);
 static void   gdk_pixmap_draw_polygon   (GdkDrawable     *drawable,
 					 GdkGC           *gc,
 					 gboolean         filled,
@@ -155,7 +146,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_arc = gdk_pixmap_draw_arc;
   drawable_class->draw_polygon = gdk_pixmap_draw_polygon;
   drawable_class->draw_drawable_with_src = gdk_pixmap_draw_drawable;
   drawable_class->draw_points = gdk_pixmap_draw_points;
@@ -259,25 +249,6 @@ gdk_pixmap_draw_rectangle (GdkDrawable *drawable,
 }
 
 static void
-gdk_pixmap_draw_arc (GdkDrawable *drawable,
-		     GdkGC       *gc,
-		     gboolean     filled,
-		     gint         x,
-		     gint         y,
-		     gint         width,
-		     gint         height,
-		     gint         angle1,
-		     gint         angle2)
-{
-  GdkPixmapObject *private = (GdkPixmapObject *)drawable;
-
-  _gdk_gc_remove_drawable_clip (gc);  
-  gdk_draw_arc (private->impl, gc, filled,
-                x, y,
-                width, height, angle1, angle2);
-}
-
-static void
 gdk_pixmap_draw_polygon (GdkDrawable *drawable,
 			 GdkGC       *gc,
 			 gboolean     filled,
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 9fdf3f7..07a026c 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -236,15 +236,6 @@ static void   gdk_window_draw_rectangle (GdkDrawable     *drawable,
 					 gint             y,
 					 gint             width,
 					 gint             height);
-static void   gdk_window_draw_arc       (GdkDrawable     *drawable,
-					 GdkGC           *gc,
-					 gboolean         filled,
-					 gint             x,
-					 gint             y,
-					 gint             width,
-					 gint             height,
-					 gint             angle1,
-					 gint             angle2);
 static void   gdk_window_draw_polygon   (GdkDrawable     *drawable,
 					 GdkGC           *gc,
 					 gboolean         filled,
@@ -470,7 +461,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_arc = gdk_window_draw_arc;
   drawable_class->draw_polygon = gdk_window_draw_polygon;
   drawable_class->draw_drawable_with_src = gdk_window_draw_drawable;
   drawable_class->draw_points = gdk_window_draw_points;
@@ -3969,27 +3959,6 @@ gdk_window_draw_rectangle (GdkDrawable *drawable,
 }
 
 static void
-gdk_window_draw_arc (GdkDrawable *drawable,
-		     GdkGC       *gc,
-		     gboolean     filled,
-		     gint         x,
-		     gint         y,
-		     gint         width,
-		     gint         height,
-		     gint         angle1,
-		     gint         angle2)
-{
-  if (GDK_WINDOW_DESTROYED (drawable))
-    return;
-
-  BEGIN_DRAW;
-  gdk_draw_arc (impl, gc, filled,
-		x - x_offset, y - y_offset,
-		width, height, angle1, angle2);
-  END_DRAW;
-}
-
-static void
 gdk_window_draw_polygon (GdkDrawable *drawable,
 			 GdkGC       *gc,
 			 gboolean     filled,
diff --git a/gdk/quartz/gdkdrawable-quartz.c b/gdk/quartz/gdkdrawable-quartz.c
index 9e11530..6c77bb4 100644
--- a/gdk/quartz/gdkdrawable-quartz.c
+++ b/gdk/quartz/gdkdrawable-quartz.c
@@ -185,80 +185,6 @@ gdk_quartz_draw_rectangle (GdkDrawable *drawable,
 }
 
 static void
-gdk_quartz_draw_arc (GdkDrawable *drawable,
-		     GdkGC       *gc,
-		     gboolean     filled,
-		     gint         x,
-		     gint         y,
-		     gint         width,
-		     gint         height,
-		     gint         angle1,
-		     gint         angle2)
-{
-  CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE);
-  float start_angle, end_angle;
-  gboolean clockwise = FALSE;
-
-  if (!context)
-    return;
-
-  _gdk_quartz_gc_update_cg_context (gc, drawable, context,
-				    filled ?
-				    GDK_QUARTZ_CONTEXT_FILL :
-				    GDK_QUARTZ_CONTEXT_STROKE);
-
-  start_angle = angle1 * 2.0 * G_PI / 360.0 / 64.0;
-  end_angle = start_angle + angle2 * 2.0 * G_PI / 360.0 / 64.0;
-
-  /*  angle2 is relative to angle1 and can be negative, which switches
-   *  the drawing direction
-   */
-  if (angle2 < 0)
-    clockwise = TRUE;
-
-  /*  below, flip the coordinate system back to its original y-diretion
-   *  so the angles passed to CGContextAddArc() are interpreted as
-   *  expected
-   *
-   *  FIXME: the implementation below works only for perfect circles
-   *  (width == height). Any other aspect ratio either scales the
-   *  line width unevenly or scales away the path entirely for very
-   *  small line widths (esp. for line_width == 0, which is a hair
-   *  line on X11 but must be approximated with the thinnest possible
-   *  line on quartz).
-   */
-
-  if (filled)
-    {
-      CGContextTranslateCTM (context,
-                             x + width / 2.0,
-                             y + height / 2.0);
-      CGContextScaleCTM (context, 1.0, - (double)height / (double)width);
-
-      CGContextMoveToPoint (context, 0, 0);
-      CGContextAddArc (context, 0, 0, width / 2.0,
-		       start_angle, end_angle,
-		       clockwise);
-      CGContextClosePath (context);
-      CGContextFillPath (context);
-    }
-  else
-    {
-      CGContextTranslateCTM (context,
-                             x + width / 2.0 + 0.5,
-                             y + height / 2.0 + 0.5);
-      CGContextScaleCTM (context, 1.0, - (double)height / (double)width);
-
-      CGContextAddArc (context, 0, 0, width / 2.0,
-		       start_angle, end_angle,
-		       clockwise);
-      CGContextStrokePath (context);
-    }
-
-  gdk_quartz_drawable_release_context (drawable, context);
-}
-
-static void
 gdk_quartz_draw_polygon (GdkDrawable *drawable,
 			 GdkGC       *gc,
 			 gboolean     filled,
@@ -529,7 +455,6 @@ gdk_drawable_impl_quartz_class_init (GdkDrawableImplQuartzClass *klass)
 
   drawable_class->create_gc = _gdk_quartz_gc_new;
   drawable_class->draw_rectangle = gdk_quartz_draw_rectangle;
-  drawable_class->draw_arc = gdk_quartz_draw_arc;
   drawable_class->draw_polygon = gdk_quartz_draw_polygon;
   drawable_class->draw_drawable_with_src = gdk_quartz_draw_drawable;
   drawable_class->draw_points = gdk_quartz_draw_points;
diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c
index 92fd843..72a01f6 100644
--- a/gdk/win32/gdkdrawable-win32.c
+++ b/gdk/win32/gdkdrawable-win32.c
@@ -55,15 +55,6 @@ static void gdk_win32_draw_rectangle (GdkDrawable    *drawable,
 				      gint            y,
 				      gint            width,
 				      gint            height);
-static void gdk_win32_draw_arc       (GdkDrawable    *drawable,
-				      GdkGC          *gc,
-				      gboolean        filled,
-				      gint            x,
-				      gint            y,
-				      gint            width,
-				      gint            height,
-				      gint            angle1,
-				      gint            angle2);
 static void gdk_win32_draw_polygon   (GdkDrawable    *drawable,
 				      GdkGC          *gc,
 				      gboolean        filled,
@@ -122,7 +113,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_arc = gdk_win32_draw_arc;
   drawable_class->draw_polygon = gdk_win32_draw_polygon;
   drawable_class->draw_drawable_with_src = gdk_win32_draw_drawable;
   drawable_class->draw_points = gdk_win32_draw_points;
@@ -783,104 +773,6 @@ gdk_win32_draw_rectangle (GdkDrawable *drawable,
 }
 
 static void
-draw_arc (GdkGCWin32 *gcwin32,
-	  HDC         hdc,
-	  gint        x_offset,
-	  gint        y_offset,
-	  va_list     args)
-{
-  HGDIOBJ old_pen;
-  gboolean filled;
-  gint x, y;
-  gint width, height;
-  gint angle1, angle2;
-  int nXStartArc, nYStartArc, nXEndArc, nYEndArc;
-
-  filled = va_arg (args, gboolean);
-  x = va_arg (args, gint);
-  y = va_arg (args, gint);
-  width = va_arg (args, gint);
-  height = va_arg (args, gint);
-  angle1 = va_arg (args, gint);
-  angle2 = va_arg (args, gint);
-
-  x -= x_offset;
-  y -= y_offset;
-  
-  if (angle2 >= 360*64)
-    {
-      nXStartArc = nYStartArc = nXEndArc = nYEndArc = 0;
-    }
-  else if (angle2 > 0)
-    {
-      nXStartArc = x + width/2 + width * cos(angle1/64.*2.*G_PI/360.);
-      nYStartArc = y + height/2 + -height * sin(angle1/64.*2.*G_PI/360.);
-      nXEndArc = x + width/2 + width * cos((angle1+angle2)/64.*2.*G_PI/360.);
-      nYEndArc = y + height/2 + -height * sin((angle1+angle2)/64.*2.*G_PI/360.);
-    }
-  else
-    {
-      nXEndArc = x + width/2 + width * cos(angle1/64.*2.*G_PI/360.);
-      nYEndArc = y + height/2 + -height * sin(angle1/64.*2.*G_PI/360.);
-      nXStartArc = x + width/2 + width * cos((angle1+angle2)/64.*2.*G_PI/360.);
-      nYStartArc = y + height/2 + -height * sin((angle1+angle2)/64.*2.*G_PI/360.);
-    }
-  
-  if (filled)
-    {
-      old_pen = SelectObject (hdc, GetStockObject (NULL_PEN));
-      GDK_NOTE (DRAW, g_print ("... Pie(%p,%d,%d,%d,%d,%d,%d,%d,%d)\n",
-			       hdc, x, y, x+width, y+height,
-			       nXStartArc, nYStartArc, nXEndArc, nYEndArc));
-      GDI_CALL (Pie, (hdc, x, y, x+width, y+height,
-		      nXStartArc, nYStartArc, nXEndArc, nYEndArc));
-      GDI_CALL (SelectObject, (hdc, old_pen));
-    }
-  else
-    {
-      GDK_NOTE (DRAW, g_print ("... Arc(%p,%d,%d,%d,%d,%d,%d,%d,%d)\n",
-			       hdc, x, y, x+width, y+height,
-			       nXStartArc, nYStartArc, nXEndArc, nYEndArc));
-      GDI_CALL (Arc, (hdc, x, y, x+width, y+height,
-		      nXStartArc, nYStartArc, nXEndArc, nYEndArc));
-    }
-}
-
-static void
-gdk_win32_draw_arc (GdkDrawable *drawable,
-		    GdkGC       *gc,
-		    gboolean     filled,
-		    gint         x,
-		    gint         y,
-		    gint         width,
-		    gint         height,
-		    gint         angle1,
-		    gint         angle2)
-{
-  GdkRectangle bounds;
-  cairo_region_t *region;
-
-  GDK_NOTE (DRAW, g_print ("gdk_win32_draw_arc: %s  %d,%d,%d,%d  %d %d\n",
-			   _gdk_win32_drawable_description (drawable),
-			   x, y, width, height, angle1, angle2));
-
-  if (width <= 2 || height <= 2 || angle2 == 0)
-    return;
-
-  bounds.x = x;
-  bounds.y = y;
-  bounds.width = width;
-  bounds.height = height;
-  region = widen_bounds (&bounds, GDK_GC_WIN32 (gc)->pen_width);
-
-  generic_draw (drawable, gc,
-		GDK_GC_FOREGROUND | (filled ? 0 : LINE_ATTRIBUTES),
-		draw_arc, region, filled, x, y, width, height, angle1, angle2);
-
-  cairo_region_destroy (region);
-}
-
-static void
 draw_polygon (GdkGCWin32 *gcwin32,
 	      HDC         hdc,
 	      gint        x_offset,
diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c
index 20c69fb..7258643 100644
--- a/gdk/x11/gdkdrawable-x11.c
+++ b/gdk/x11/gdkdrawable-x11.c
@@ -55,15 +55,6 @@ static void gdk_x11_draw_rectangle (GdkDrawable    *drawable,
 				    gint            y,
 				    gint            width,
 				    gint            height);
-static void gdk_x11_draw_arc       (GdkDrawable    *drawable,
-				    GdkGC          *gc,
-				    gboolean        filled,
-				    gint            x,
-				    gint            y,
-				    gint            width,
-				    gint            height,
-				    gint            angle1,
-				    gint            angle2);
 static void gdk_x11_draw_polygon   (GdkDrawable    *drawable,
 				    GdkGC          *gc,
 				    gboolean        filled,
@@ -118,7 +109,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_arc = gdk_x11_draw_arc;
   drawable_class->draw_polygon = gdk_x11_draw_polygon;
   drawable_class->draw_drawable_with_src = gdk_x11_draw_drawable;
   drawable_class->draw_points = gdk_x11_draw_points;
@@ -341,30 +331,6 @@ gdk_x11_draw_rectangle (GdkDrawable *drawable,
 }
 
 static void
-gdk_x11_draw_arc (GdkDrawable *drawable,
-		  GdkGC       *gc,
-		  gboolean     filled,
-		  gint         x,
-		  gint         y,
-		  gint         width,
-		  gint         height,
-		  gint         angle1,
-		  gint         angle2)
-{
-  GdkDrawableImplX11 *impl;
-
-  impl = GDK_DRAWABLE_IMPL_X11 (drawable);
-
-  
-  if (filled)
-    XFillArc (GDK_SCREEN_XDISPLAY (impl->screen), impl->xid,
-	      GDK_GC_GET_XGC (gc), x, y, width, height, angle1, angle2);
-  else
-    XDrawArc (GDK_SCREEN_XDISPLAY (impl->screen), impl->xid,
-	      GDK_GC_GET_XGC (gc), x, y, width, height, angle1, angle2);
-}
-
-static void
 gdk_x11_draw_polygon (GdkDrawable *drawable,
 		      GdkGC       *gc,
 		      gboolean     filled,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]