diff src/image-overlay.c @ 1302:8d1f9739c06a

Add grid to bar histogram, simplify the code and draw horizontal lines too.
author zas_
date Sat, 21 Feb 2009 10:29:13 +0000
parents c37f36b97173
children fcf0e7a6143e
line wrap: on
line diff
--- a/src/image-overlay.c	Thu Feb 19 17:36:38 2009 +0000
+++ b/src/image-overlay.c	Sat Feb 21 10:29:13 2009 +0000
@@ -640,21 +640,8 @@
 			gint x = 5;
 			gint y = height - HISTOGRAM_HEIGHT - 5;
 			gint w = width - 10;
-			float xoffset = 0;
-			gint subdiv = 5;
-			gint c = 160;
-			gint alpha = 250;
-			gint i;
-			float add = w / (float)subdiv;
 
-			for (i = 0; i < subdiv; i++)
-				{
-				gint d = (i > 0 ? 0 : 1);
-
-				pixbuf_set_rect(pixbuf, x + xoffset + 0.5, y, add + d + 0.5, HISTOGRAM_HEIGHT, c, c, c, alpha, d, 1, 1, 1);
-				xoffset += add+d;
-				}
-						
+			pixbuf_set_rect_fill(pixbuf, x, y, w, HISTOGRAM_HEIGHT, 220, 220, 220, 210);
 			histogram_draw(osd->histogram, histmap, pixbuf, x, y, w, HISTOGRAM_HEIGHT);
 			}
 		pixbuf_draw_layout(pixbuf, layout, imd->pr, 5, 5, 0, 0, 0, 255);