[xiph-commits] r18244 - trunk/spectrum

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Sat Apr 21 19:27:21 PDT 2012


Author: xiphmont
Date: 2012-04-21 19:27:21 -0700 (Sat, 21 Apr 2012)
New Revision: 18244

Modified:
   trunk/spectrum/spec_plot.c
   trunk/spectrum/version.h
Log:
Make better use of clip rectangle in spec_plot



Modified: trunk/spectrum/spec_plot.c
===================================================================
--- trunk/spectrum/spec_plot.c	2012-04-21 22:17:51 UTC (rev 18243)
+++ trunk/spectrum/spec_plot.c	2012-04-22 02:27:21 UTC (rev 18244)
@@ -556,12 +556,8 @@
   }
 
 
-  {
-    GdkGCValues values;
-    //gdk_gc_get_values(p->drawgc,&values);
-    values.line_width=2;
-    gdk_gc_set_values(p->drawgc,&values,GDK_GC_LINE_WIDTH);
-  }
+  gdk_gc_set_line_attributes(p->drawgc,2,GDK_LINE_SOLID,GDK_CAP_BUTT,
+                             GDK_JOIN_MITER);
 
   /* draw actual data */
   if(p->ydata){
@@ -602,15 +598,7 @@
 		int ly = y;
 		int lp = prev;
 
-		if(lp>=height-p->pady-1)lp=height-p->pady-1;
-
-		if(ly>=height-p->pady-1){
-                  ly=height-p->pady-1;
-                  gdk_draw_line(p->backing,p->drawgc,padx+i-1,lp,padx+i,ly);
-                  gdk_draw_point(p->backing,p->drawgc,padx+i,ly);
-                }else{
-                  gdk_draw_line(p->backing,p->drawgc,padx+i-1,lp,padx+i,ly);
-                }
+                gdk_draw_line(p->backing,p->drawgc,padx+i-1,lp,padx+i,ly);
 	      }
 	      first=1;
 	      prev=y;

Modified: trunk/spectrum/version.h
===================================================================
--- trunk/spectrum/version.h	2012-04-21 22:17:51 UTC (rev 18243)
+++ trunk/spectrum/version.h	2012-04-22 02:27:21 UTC (rev 18244)
@@ -1,2 +1,2 @@
 #define VERSION "$Id$ "
-/* DO NOT EDIT: Automated versioning hack [Sat Apr 21 18:16:48 EDT 2012] */
+/* DO NOT EDIT: Automated versioning hack [Sat Apr 21 22:27:03 EDT 2012] */



More information about the commits mailing list