[rhmessaging-commits] rhmessaging commits: r3851 - in mgmt/trunk/cumin/python/cumin: grid and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Feb 15 15:11:56 EST 2010


Author: eallen
Date: 2010-02-15 15:11:55 -0500 (Mon, 15 Feb 2010)
New Revision: 3851

Modified:
   mgmt/trunk/cumin/python/cumin/charts.py
   mgmt/trunk/cumin/python/cumin/grid/slot.strings
Log:
Draw squares instead of spheres for png slot vis.

Modified: mgmt/trunk/cumin/python/cumin/charts.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/charts.py	2010-02-11 19:38:10 UTC (rev 3850)
+++ mgmt/trunk/cumin/python/cumin/charts.py	2010-02-15 20:11:55 UTC (rev 3851)
@@ -26,22 +26,12 @@
         self.surface = None
 
     def plot_dot(self, interior, width, height):
-        pnumbx = (115 / 128.0) * width / 2.5
-        pnumby = (102 / 128.0) * width / 2.5
-        pnumbr = (14  / 128.0) * width
-        shadox = (102 / 128.0) * width
-        shadoy = (102 / 128.0) * width
-        arc = 0.5 * width
-
         surface = ImageSurface(FORMAT_ARGB32, width, height)
         cr = Context(surface)
         cr.set_line_width(1)
 
-        radial = RadialGradient(pnumbx, pnumby, pnumbr, shadox, shadoy, width)
-        radial.add_color_stop_rgba(0,  1, 1, 1, 1)
-        radial.add_color_stop_rgb(1, *interior)
-        cr.set_source(radial)
-        cr.arc(arc, arc, arc, 0, 2.0 * pi)
+        cr.set_source_rgb(*interior)
+        cr.rectangle(0, 0, width - 1, width - 1)
         cr.fill()
         return surface
 
@@ -50,12 +40,6 @@
         slot_size = self.slot_size(count, zl)
         x = 0
         y = 0
-        pnumbx = (115 / 128.0) * slot_size / 2.5
-        pnumby = (102 / 128.0) * slot_size / 2.5
-        pnumbr = (14  / 128.0) * slot_size
-        shadox = (102 / 128.0) * slot_size
-        shadoy = (102 / 128.0) * slot_size
-        arc = 0.5 * slot_size
         col = 0
         self.rows = 1
         # the width and height depend on the number of slots
@@ -74,22 +58,9 @@
                 col = 0
                 self.rows = self.rows + 1
 
-            # draw dots if they are big enough
-            if slot_size >= self.min_sphere_size:
-                radial = RadialGradient(x + pnumbx,
-                            y + pnumby,
-                            pnumbr, x + shadox,
-                            y + shadoy, slot_size)
-                radial.add_color_stop_rgba(0,  1, 1, 1, 1)
-                radial.add_color_stop_rgb(1, *interior)
-                cr.set_source(radial)
-                cr.arc(x + arc, y + arc, arc, 0, 2.0 * pi)
-                cr.fill()
-            else:
-                # just draw squares
-                cr.set_source_rgb(*interior)
-                cr.rectangle(x, y, slot_size - 1, slot_size - 1)
-                cr.fill()
+            cr.set_source_rgb(*interior)
+            cr.rectangle(x, y, slot_size - 1, slot_size - 1)
+            cr.fill()
 
             # draw the state if the slots are big enough
             if state and slot_size >= self.min_font:

Modified: mgmt/trunk/cumin/python/cumin/grid/slot.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/slot.strings	2010-02-11 19:38:10 UTC (rev 3850)
+++ mgmt/trunk/cumin/python/cumin/grid/slot.strings	2010-02-15 20:11:55 UTC (rev 3851)
@@ -897,7 +897,7 @@
     z-index: 10;
     width: 28px;
     height: 28px;
-    -moz-border-radius: 50%;
+/*    -moz-border-radius: 50%; */
 }
 
 div#slot_zooming {



More information about the rhmessaging-commits mailing list