API: remove gdk_draw_{line,lines,segments}
Those were the 3 intermixed line drawing calls.
This commit is contained in:
		| @ -318,80 +318,6 @@ gdk_quartz_fix_cap_not_last_line (GdkGCQuartz *private, | ||||
|     } | ||||
| } | ||||
|  | ||||
| static void | ||||
| gdk_quartz_draw_segments (GdkDrawable    *drawable, | ||||
| 			  GdkGC          *gc, | ||||
| 			  GdkSegment     *segs, | ||||
| 			  gint            nsegs) | ||||
| { | ||||
|   CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE); | ||||
|   GdkGCQuartz *private; | ||||
|   int i; | ||||
|  | ||||
|   if (!context) | ||||
|     return; | ||||
|  | ||||
|   private = GDK_GC_QUARTZ (gc); | ||||
|  | ||||
|   _gdk_quartz_gc_update_cg_context (gc, drawable, context, | ||||
| 				    GDK_QUARTZ_CONTEXT_STROKE); | ||||
|  | ||||
|   for (i = 0; i < nsegs; i++) | ||||
|     { | ||||
|       gint xfix, yfix; | ||||
|  | ||||
|       gdk_quartz_fix_cap_not_last_line (private, | ||||
| 					segs[i].x1, segs[i].y1, | ||||
| 					segs[i].x2, segs[i].y2, | ||||
| 					&xfix, &yfix); | ||||
|  | ||||
|       CGContextMoveToPoint (context, segs[i].x1 + 0.5, segs[i].y1 + 0.5); | ||||
|       CGContextAddLineToPoint (context, segs[i].x2 + 0.5 + xfix, segs[i].y2 + 0.5 + yfix); | ||||
|     } | ||||
|    | ||||
|   CGContextStrokePath (context); | ||||
|  | ||||
|   gdk_quartz_drawable_release_context (drawable, context); | ||||
| } | ||||
|  | ||||
| static void | ||||
| gdk_quartz_draw_lines (GdkDrawable *drawable, | ||||
| 		       GdkGC       *gc, | ||||
| 		       GdkPoint    *points, | ||||
| 		       gint         npoints) | ||||
| { | ||||
|   CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE); | ||||
|   GdkGCQuartz *private; | ||||
|   gint xfix, yfix; | ||||
|   gint i; | ||||
|  | ||||
|   if (!context) | ||||
|     return; | ||||
|  | ||||
|   private = GDK_GC_QUARTZ (gc); | ||||
|  | ||||
|   _gdk_quartz_gc_update_cg_context (gc, drawable, context, | ||||
| 				    GDK_QUARTZ_CONTEXT_STROKE); | ||||
|  | ||||
|   CGContextMoveToPoint (context, points[0].x + 0.5, points[0].y + 0.5); | ||||
|  | ||||
|   for (i = 1; i < npoints - 1; i++) | ||||
|     CGContextAddLineToPoint (context, points[i].x + 0.5, points[i].y + 0.5); | ||||
|  | ||||
|   gdk_quartz_fix_cap_not_last_line (private, | ||||
| 				    points[npoints - 2].x, points[npoints - 2].y, | ||||
| 				    points[npoints - 1].x, points[npoints - 1].y, | ||||
| 				    &xfix, &yfix); | ||||
|  | ||||
|   CGContextAddLineToPoint (context, | ||||
| 			   points[npoints - 1].x + 0.5 + xfix, | ||||
| 			   points[npoints - 1].y + 0.5 + yfix); | ||||
|  | ||||
|   CGContextStrokePath (context); | ||||
|  | ||||
|   gdk_quartz_drawable_release_context (drawable, context); | ||||
| } | ||||
|  | ||||
| static void | ||||
| gdk_drawable_impl_quartz_finalize (GObject *object) | ||||
| { | ||||
| @ -417,8 +343,6 @@ gdk_drawable_impl_quartz_class_init (GdkDrawableImplQuartzClass *klass) | ||||
|   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->draw_segments = gdk_quartz_draw_segments; | ||||
|   drawable_class->draw_lines = gdk_quartz_draw_lines; | ||||
|  | ||||
|   drawable_class->ref_cairo_surface = gdk_quartz_ref_cairo_surface; | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Benjamin Otte
					Benjamin Otte