Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-06-04 18:05:50 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-06-04 18:05:50 (GMT)
commit9198771cfedbb0b4f4950b75f658966816f6186f (patch)
treed4314d0b9c81cdcef479dd860eb6decddb523df4
parente330110a96ceea2d7a430ed403af69d8a100c6c5 (diff)
adding hex
-rw-r--r--AbacusActivity.py28
-rw-r--r--NEWS5
-rwxr-xr-xabacus.py10
-rw-r--r--abacus_window.py571
-rw-r--r--activity/activity.info2
-rw-r--r--icons/Hoff.svg194
-rw-r--r--icons/Hon.svg194
7 files changed, 689 insertions, 315 deletions
diff --git a/AbacusActivity.py b/AbacusActivity.py
index cab20d0..6c6850b 100644
--- a/AbacusActivity.py
+++ b/AbacusActivity.py
@@ -98,6 +98,14 @@ class AbacusActivity(activity.Activity):
toolbar_box.toolbar.insert(self.binary, -1)
self.binary.show()
+ # Hexadecimal (base 16)
+ self.hex = ToolButton( "Hoff" )
+ self.hex.set_tooltip(_('Hexadecimal'))
+ self.hex.props.sensitive = True
+ self.hex.connect('clicked', self._hex_cb)
+ toolbar_box.toolbar.insert(self.hex, -1)
+ self.hex.show()
+
# Fractions (1/2, 1/3, 1/4, 1/5, 1/6, 1/8, 1/9, 1/10, 1/12)
self.fraction = ToolButton( "Foff" )
self.fraction.set_tooltip(_('Fraction'))
@@ -154,6 +162,8 @@ class AbacusActivity(activity.Activity):
self._mayan_cb(None)
elif self.metadata['abacus'] == 'binary':
self._binary_cb(None)
+ elif self.metadata['abacus'] == 'hex':
+ self._hex_cb(None)
elif self.metadata['abacus'] == 'fraction':
self._fraction_cb(None)
else:
@@ -172,12 +182,14 @@ class AbacusActivity(activity.Activity):
self.russian.set_icon("Roff")
self.mayan.set_icon("Moff")
self.binary.set_icon("Boff")
+ self.hex.set_icon("Hoff")
self.fraction.set_icon("Foff")
self.abacus.chinese.hide()
self.abacus.japanese.hide()
self.abacus.russian.hide()
self.abacus.mayan.hide()
self.abacus.binary.hide()
+ self.abacus.hex.hide()
self.abacus.fraction.hide()
def _chinese_cb(self, button):
@@ -220,6 +232,14 @@ class AbacusActivity(activity.Activity):
self.abacus.mode = self.abacus.binary
_logger.debug("Setting mode to %s" % (self.abacus.mode.name))
+ def _hex_cb(self, button):
+ """ Display the hex; hide the others """
+ self._all_off()
+ self.hex.set_icon("Hon")
+ self.abacus.hex.show()
+ self.abacus.mode = self.abacus.hex
+ _logger.debug("Setting mode to %s" % (self.abacus.mode.name))
+
def _fraction_cb(self, button):
""" Display the fraction; hide the others """
self._all_off()
@@ -288,6 +308,14 @@ class ProjectToolbar(gtk.Toolbar):
self.insert(self.activity.binary, -1)
self.activity.binary.show()
+ # Hexadecimal style
+ self.activity.hex = ToolButton( "Hoff" )
+ self.activity.hex.set_tooltip(_('Hexadecimal'))
+ self.activity.hex.props.sensitive = True
+ self.activity.hex.connect('clicked', self.activity._hex_cb)
+ self.insert(self.activity.hex, -1)
+ self.activity.hex.show()
+
# Fraction style
self.activity.fraction = ToolButton( "Foff" )
self.activity.fraction.set_tooltip(_('Fraction'))
diff --git a/NEWS b/NEWS
index 58b4825..fe5e14c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+8
+
+* added hexadecimal
+* code cleanup to make it easier to modify/extend
+
7
* fixed restore bug with fraction abacus
diff --git a/abacus.py b/abacus.py
index 5f3a95f..fa71819 100755
--- a/abacus.py
+++ b/abacus.py
@@ -64,6 +64,9 @@ class AbacusMain:
menu_items = gtk.MenuItem(_("Binary"))
menu.append(menu_items)
menu_items.connect("activate", self._b_cb)
+ menu_items = gtk.MenuItem(_("Hexadecimal"))
+ menu.append(menu_items)
+ menu_items.connect("activate", self._h_cb)
menu_items = gtk.MenuItem(_("Fraction"))
menu.append(menu_items)
menu_items.connect("activate", self._f_cb)
@@ -114,6 +117,7 @@ class AbacusMain:
self.abacus.russian.hide()
self.abacus.mayan.hide()
self.abacus.binary.hide()
+ self.abacus.hex.hide()
self.abacus.fraction.hide()
def _c_cb(self, widget):
@@ -146,6 +150,12 @@ class AbacusMain:
self.abacus.mode = self.abacus.binary
return True
+ def _h_cb(self, widget):
+ self._hide_all()
+ self.abacus.hex.show()
+ self.abacus.mode = self.abacus.hex
+ return True
+
def _f_cb(self, widget):
self._hide_all()
self.abacus.fraction.show()
diff --git a/abacus_window.py b/abacus_window.py
index 7f6f2b2..9de0271 100644
--- a/abacus_window.py
+++ b/abacus_window.py
@@ -15,6 +15,12 @@ BWIDTH = 40
BHEIGHT = 30
BOFFSET = 10
FSTROKE = 45
+FRAME_LAYER = 100
+ROD_LAYER = 101
+BEAD_LAYER = 102
+BAR_LAYER = 103
+MARK_LAYER = 104
+
ROD_COLORS = ["#006ffe", "#007ee7", "#0082c4", "#0089ab", "#008c8b",
"#008e68", "#008e4c", "#008900", "#5e7700", "#787000",
"#876a00", "#986200", "#ab5600", "#d60000", "#e30038"]
@@ -102,11 +108,71 @@ def _svg_style(extras=""):
""" Returns SVG style for shape rendering """
return "%s%s%s" % ("style=\"", extras, "\"/>\n")
+class Bead():
+ """ The Bead class is used to define the individual beads. """
+
+ def __init__(self, sprite, offset, value):
+ """ We store an sprite, an offset, and a value for each bead """
+ self.spr = sprite
+ self.offset = offset
+ if value < 1:
+ self.value = value
+ else:
+ self.value = int(value)
+ self.state = 0
+ self.spr.type = 'bead'
+ self.level = 0 # Used for changing color
+
+ def hide(self):
+ """ Hide the sprite associated with the bead """
+ self.spr.hide()
+
+ def show(self):
+ """ Show the sprite associated with the bead """
+ self.spr.set_layer(BEAD_LAYER)
+
+ def move_up(self):
+ """ Move a bead up as far as it will go, """
+ self.spr.move_relative((0, -self.offset))
+ self.state = 1-self.state
+ self.set_level(3)
+
+ def move_down(self):
+ """ Move a bead down as far as it will go. """
+ self.spr.move_relative((0, self.offset))
+ self.state = 1-self.state
+ self.set_level(3)
+
+ def get_value(self):
+ """ Return a value if bead state is 1 """
+ if self.state == 1:
+ return self.value
+ else:
+ return 0
+
+ def get_state(self):
+ """ Is the bead 'active' """
+ return self.state
+
+ def set_color(self, color):
+ """ Set color of bead """
+ self.spr.set_image(color)
+ self.spr.inval()
+ self.show()
+
+ def get_level(self):
+ """ Return color level of bead -- used for fade """
+ return self.level
+
+ def set_level(self, level):
+ """ Set color level of bead -- used for fade """
+ self.level = level
class Abacus():
+ """ The Abacus class is used to define the user interaction. """
def __init__(self, canvas, parent=None):
- """ Abacus class """
+ """ Initialize the canvas and set up the callbacks. """
self.activity = parent
if parent is None: # Starting from command line
@@ -137,6 +203,7 @@ class Abacus():
self.russian = Schety(self)
self.mayan = Nepohualtzintzin(self)
self.binary = Binary(self)
+ self.hex = Hex(self)
self.fraction = Fractions(self)
self.chinese.show()
@@ -144,6 +211,7 @@ class Abacus():
self.russian.hide()
self.mayan.hide()
self.binary.hide()
+ self.hex.hide()
self.fraction.hide()
self.mode = self.chinese
@@ -193,15 +261,22 @@ class Abacus():
class AbacusGeneric():
+ """ A generic abacus: a frame, rods, and beads. """
def __init__(self, abacus):
""" Specify parameters that define the abacus """
self.abacus = abacus
+ self.set_parameters()
+ self.create()
+
+ def set_parameters(self):
+ """ Define the physical paramters. """
self.name = "suanpan"
self.num_rods = 15
- self.bot_beads = 2
- self.top_beads = 5
- self.create()
+ self.bot_beads = 5
+ self.top_beads = 2
+ self.base = 10
+ self.top_factor = 5
def create(self):
""" Create and position the sprites that compose the abacus """
@@ -299,47 +374,52 @@ class AbacusGeneric():
_svg_str_to_pixbuf(_rod)))
for b in range(self.top_beads):
- self.beads.append(Sprite(self.abacus.sprites, x+i*dx+bo,
- y+b*BHEIGHT*self.abacus.scale,
- self.colors[0]))
+ self.beads.append(Bead(Sprite(self.abacus.sprites, x+i*dx+bo,
+ y+b*BHEIGHT*self.abacus.scale,
+ self.colors[0]),
+ 2*BHEIGHT*self.abacus.scale,
+ self.top_factor*(pow(self.base,
+ self.num_rods-i-1))))
for b in range(self.bot_beads):
if self.top_beads > 0:
- self.beads.append(Sprite(self.abacus.sprites, x+i*dx+bo,
- y+(self.top_beads+5+b)*BHEIGHT\
- *self.abacus.scale,
- self.colors[0]))
+ self.beads.append(Bead(Sprite(self.abacus.sprites,
+ x+i*dx+bo,
+ y+(self.top_beads+5+b)*\
+ BHEIGHT*self.abacus.scale,
+ self.colors[0]),
+ 2*BHEIGHT*self.abacus.scale,
+ pow(self.base,self.num_rods-i-1)))
else:
- self.beads.append(Sprite(self.abacus.sprites, x+i*dx+bo,
- y+(2+b)*BHEIGHT\
- *self.abacus.scale,
- self.colors[0]))
+ self.beads.append(Bead(Sprite(self.abacus.sprites,
+ x+i*dx+bo,
+ y+(2+b)*BHEIGHT\
+ *self.abacus.scale,
+ self.colors[0]),
+ 2*BHEIGHT*self.abacus.scale,
+ pow(self.base,self.num_rods-i-1)))
- for r in self.rods:
- r.type = "frame"
- for i in self.beads:
- i.type = 'bead'
- i.state = 0
- i.level = 0
+ for rod in self.rods:
+ rod.type = "frame"
def hide(self):
""" Hide the rod, beads, mark, and frame. """
- for i in self.rods:
- i.hide()
- for i in self.beads:
- i.hide()
+ for rod in self.rods:
+ rod.hide()
+ for bead in self.beads:
+ bead.hide()
self.bar.hide()
self.frame.hide()
self.mark.hide()
def show(self):
""" Show the rod, beads, mark, and frame. """
- self.frame.set_layer(100)
- for i in self.rods:
- i.set_layer(101)
- for i in self.beads:
- i.set_layer(102)
- self.bar.set_layer(103)
- self.mark.set_layer(104)
+ self.frame.set_layer(FRAME_LAYER)
+ for rod in self.rods:
+ rod.set_layer(ROD_LAYER)
+ for bead in self.beads:
+ bead.show()
+ self.bar.set_layer(BAR_LAYER)
+ self.mark.set_layer(MARK_LAYER)
def set_value(self, string):
""" Set abacus to value in string """
@@ -364,33 +444,25 @@ class AbacusGeneric():
def set_rod_value(self, r, v):
""" Move beads on rod r to represent value v """
- bot = v % 5
- top = (v-bot)/5
+ bot = v % self.top_factor
+ top = (v-bot)/self.top_factor
top_bead_index = r*(self.top_beads+self.bot_beads)
bot_bead_index = r*(self.top_beads+self.bot_beads)+self.top_beads
# Clear the top.
for i in range(self.top_beads):
- if self.beads[top_bead_index+i].state:
- self.beads[top_bead_index+i].move_relative((0,
- -2*BHEIGHT*self.abacus.scale))
- self.beads[top_bead_index+i].state = 0
+ if self.beads[top_bead_index+i].get_state() == 1:
+ self.beads[top_bead_index+i].move_up()
# Clear the bottom.
for i in range(self.bot_beads):
- if self.beads[bot_bead_index+i].state:
- self.beads[bot_bead_index+i].move_relative((0,
- 2*BHEIGHT*self.abacus.scale))
- self.beads[bot_bead_index+i].state = 0
+ if self.beads[bot_bead_index+i].get_state() == 1:
+ self.beads[bot_bead_index+i].move_down()
# Set the top.
for i in range(top):
- self.beads[top_bead_index+self.top_beads-i-1].move_relative((0,
- 2*BHEIGHT*self.abacus.scale))
- self.beads[top_bead_index+self.top_beads-i-1].state = 1
+ self.beads[top_bead_index+self.top_beads-i-1].move_down()
# Set the bottom
for i in range(bot):
- self.beads[bot_bead_index+i].move_relative((0,
- -2*BHEIGHT*self.abacus.scale))
- self.beads[bot_bead_index+i].state = 1
+ self.beads[bot_bead_index+i].move_up()
def value(self, count_beads=False):
""" Return a string representing the value of each rod. """
@@ -400,12 +472,12 @@ class AbacusGeneric():
v.append(0)
# Tally the values on each rod.
- for i, b in enumerate(self.beads):
+ for i, bead in enumerate(self.beads):
r = i/(self.top_beads+self.bot_beads)
j = i % (self.top_beads+self.bot_beads)
- if b.state == 1:
+ if bead.get_state() == 1:
if j < self.top_beads:
- v[r+1] += 5
+ v[r+1] += self.top_factor
else:
v[r+1] += 1
@@ -414,16 +486,10 @@ class AbacusGeneric():
for j in v[1:]:
string += "%2d" % (j)
else:
- # Carry to the left if a rod has a value > 9.
- for j in range(self.num_rods):
- if v[len(v)-j-1] > 9:
- v[len(v)-j-1] -= 10
- v[len(v)-j-2] += 1
-
- # Convert values to a string.
- for j in v:
- if string != '' or j > 0:
- string += str(j)
+ sum = 0
+ for bead in self.beads:
+ sum += bead.get_value()
+ string = str(sum)
return(string)
@@ -435,203 +501,145 @@ class AbacusGeneric():
""" Move indicator horizontally across the top of the frame. """
self.mark.move_relative((dx, 0))
- def set_color(self, bead, level=3):
- """ Set color of bead to one of four fade levels. """
- bead.set_image(self.colors[level])
- bead.inval()
- bead.level = level
-
def fade_colors(self):
- """ Reduce the fade level of every bead. """
+ """ Reduce the saturation level of every bead. """
for bead in self.beads:
- if bead.level > 0:
- self.set_color(bead, bead.level-1)
-
- def move_bead(self, bead, dy):
+ if bead.get_level() > 0:
+ bead.set_color(self.colors[bead.get_level()-1])
+ bead.set_level(bead.get_level()-1)
+
+ def move_bead(self, sprite, dy):
""" Move a bead (or beads) up or down a rod. """
- i = self.beads.index(bead)
+
+ # find the bead associated with the sprite
+ i = -1
+ for bead in self.beads:
+ if sprite == bead.spr:
+ i = self.beads.index(bead)
+ break
+ if i == -1:
+ print "bead not found"
+ return
+
b = i % (self.top_beads+self.bot_beads)
if b < self.top_beads:
- if dy > 0 and bead.state == 0:
+ if dy > 0 and bead.get_state() == 0:
self.fade_colors()
- self.set_color(bead)
- bead.move_relative((0, 2*BHEIGHT*self.abacus.scale))
- bead.state = 1
+ bead.set_color(self.colors[3])
+ bead.move_down()
# Make sure beads below this bead are also moved.
for ii in range(self.top_beads-b):
if self.beads[i+ii].state == 0:
- self.set_color(self.beads[i+ii])
- self.beads[i+ii].move_relative((0,
- 2*BHEIGHT*self.abacus.scale))
- self.beads[i+ii].state = 1
+ self.beads[i+ii].set_color(self.colors[3])
+ self.beads[i+ii].move_down()
elif dy < 0 and bead.state == 1:
self.fade_colors()
- self.set_color(bead)
- bead.move_relative((0, -2*BHEIGHT*self.abacus.scale))
- bead.state = 0
+ bead.set_color(self.colors[3])
+ bead.move_up()
# Make sure beads above this bead are also moved.
for ii in range(b+1):
if self.beads[i-ii].state == 1:
- self.set_color(self.beads[i-ii])
- self.beads[i-ii].move_relative((0,
- -2*BHEIGHT*self.abacus.scale))
- self.beads[i-ii].state = 0
+ self.beads[i-ii].set_color(self.colors[3])
+ self.beads[i-ii].move_up()
else:
if dy < 0 and bead.state == 0:
self.fade_colors()
- self.set_color(bead)
- bead.move_relative((0, -2*BHEIGHT*self.abacus.scale))
- bead.state = 1
+ bead.set_color(self.colors[3])
+ bead.move_up()
# Make sure beads above this bead are also moved.
for ii in range(b-self.top_beads+1):
if self.beads[i-ii].state == 0:
- self.set_color(self.beads[i-ii])
- self.beads[i-ii].move_relative((0,
- -2*BHEIGHT*self.abacus.scale))
- self.beads[i-ii].state = 1
+ self.beads[i-ii].set_color(self.colors[3])
+ self.beads[i-ii].move_up()
elif dy > 0 and bead.state == 1:
self.fade_colors()
- self.set_color(bead)
- bead.move_relative((0, 2*BHEIGHT*self.abacus.scale))
- bead.state = 0
+ bead.set_color(self.colors[3])
+ bead.move_down()
# Make sure beads below this bead are also moved.
for ii in range(self.top_beads+self.bot_beads-b):
if self.beads[i+ii].state == 1:
- self.set_color(self.beads[i+ii])
- self.beads[i+ii].move_relative((0,
- 2*BHEIGHT*self.abacus.scale))
- self.beads[i+ii].state = 0
+ self.beads[i+ii].set_color(self.colors[3])
+ self.beads[i+ii].move_down()
+
class Nepohualtzintzin(AbacusGeneric):
+ """ A Mayan abacus """
- def __init__(self, abacus):
+ def set_parameters(self):
""" Specify parameters that define the abacus """
- self.abacus = abacus
self.name = 'nepohualtzintzin'
self.num_rods = 13
self.bot_beads = 4
self.top_beads = 3
- self.create()
-
- def value(self, count_beads=False):
- """ Override default: base 20 """
- string = ''
- v = []
- for r in range(self.num_rods+1): # +1 for overflow
- v.append(0)
-
- # Tally the values on each rod.
- for i, b in enumerate(self.beads):
- r = i/(self.top_beads+self.bot_beads)
- j = i % (self.top_beads+self.bot_beads)
- if b.state == 1:
- if count_beads:
- f = 1
- else:
- f = pow(2, self.num_rods-r-1)
- if j < self.top_beads:
- v[r+1] += 5*f
- else:
- v[r+1] += 1*f
-
- if count_beads:
- # Save the value associated with each rod as a 2-byte int.
- for j in v[1:]:
- string += "%2d" % (j)
- else:
- # Carry to the left if a rod has a value > 9.
- for j in range(self.num_rods):
- if v[len(v)-j-1] > 9:
- units = v[len(v)-j-1] % 10
- tens = v[len(v)-j-1]-units
- v[len(v)-j-1] = units
- v[len(v)-j-2] += tens/10
-
- # Convert values to a string.
- for j in v:
- if string != '' or j > 0:
- string += str(int(j))
- return(string)
+ self.base = 20
+ self.top_factor = 5
class Suanpan(AbacusGeneric):
+ """ A Chinese abacus """
- def __init__(self, abacus):
+ def set_parameters(self):
""" Create a Chinese abacus: 15 by (5,2). """
- self.abacus = abacus
self.name = 'saunpan'
self.num_rods = 15
self.bot_beads = 5
self.top_beads = 2
- self.create()
+ self.base = 10
+ self.top_factor = 5
class Soroban(AbacusGeneric):
+ """ A Japanese abacus """
- def __init__(self, abacus):
+ def set_parameters(self):
""" create a Japanese abacus: 15 by (4,1) """
- self.abacus = abacus
self.name = 'soroban'
self.num_rods = 15
self.bot_beads = 4
self.top_beads = 1
- self.create()
+ self.base = 10
+ self.top_factor = 5
+
+
+class Hex(AbacusGeneric):
+ """ A hexadecimal abacus """
+
+ def set_parameters(self):
+ """ create a hexadecimal abacus: 15 by (7,1) """
+ self.name = 'hexadecimal'
+ self.num_rods = 15
+ self.bot_beads = 7
+ self.top_beads = 1
+ self.base = 16
+ self.top_factor = 8
class Binary(AbacusGeneric):
+ """ A binary abacus """
- def __init__(self, abacus):
+ def set_parameters(self):
""" create a Binary abacus: 15 by (1,0) """
- self.abacus = abacus
self.name = 'binary'
self.num_rods = 15
self.bot_beads = 1
self.top_beads = 0
- self.create()
-
- def value(self, count_beads=False):
- """ Override for base 2 """
- string = ''
- value = 0
- v = []
- for r in range(self.num_rods+1): # +1 for overflow
- v.append(0)
-
- # Tally the values on each rod.
- for i, b in enumerate(self.beads):
- r = i/(self.top_beads+self.bot_beads)
- j = i % (self.top_beads+self.bot_beads)
- if b.state == 1:
- if j < self.top_beads:
- v[r+1] += 5
- else:
- v[r+1] += 1
-
- if count_beads:
- # Save the value associated with each rod as a 2-byte integer.
- for j in v[1:]:
- string += "%2d" % (j)
- else:
- for j in range(self.num_rods):
- if v[len(v)-j-1] == 1:
- value += pow(2, j)
- string = str(int(value))
-
- return(string)
+ self.base = 2
+ self.top_factor = 1
class Schety(AbacusGeneric):
+ """ A Russian abacus """
- def __init__(self, abacus):
+ def set_parameters(self):
""" Create a Russian abacus: 15 by 10 (with one rod of 4 beads). """
- self.abacus = abacus
self.name = "schety"
self.num_rods = 15
self.top_beads = 0
self.bot_beads = 10
self.bead_count = (10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 4, 10, 10,
10, 10)
- self.create()
+ self.base = 10
+ self.top_factor = 5
def draw_rods_and_beads(self, x, y):
""" Override default in order to make a short rod """
@@ -665,86 +673,56 @@ class Schety(AbacusGeneric):
color = self.black
else:
color = self.white
- self.beads.append(Sprite(self.abacus.sprites, x+i*dx+bo,
- y+(8+b)*BHEIGHT*self.abacus.scale,
- color))
+ self.beads.append(Bead(Sprite(self.abacus.sprites,
+ x+i*dx+bo,
+ y+(8+b)*BHEIGHT*\
+ self.abacus.scale,
+ color),
+ 8*BHEIGHT*self.abacus.scale,
+ 0.25)) # 1/4 ruples
+ elif i < 10:
+ for b in range(self.bot_beads):
+ if b in [4, 5]:
+ color = self.black
+ else:
+ color = self.white
+ self.beads.append(Bead(Sprite(self.abacus.sprites,
+ x+i*dx+bo,
+ y+(2+b)*BHEIGHT*\
+ self.abacus.scale,
+ color),
+ 2*BHEIGHT*self.abacus.scale,
+ pow(10,9-i)))
else:
for b in range(self.bot_beads):
if b in [4, 5]:
color = self.black
else:
color = self.white
- self.beads.append(Sprite(self.abacus.sprites, x+i*dx+bo,
- y+(2+b)*BHEIGHT*self.abacus.scale,
- color))
+ self.beads.append(Bead(Sprite(self.abacus.sprites,
+ x+i*dx+bo,
+ y+(2+b)*BHEIGHT*\
+ self.abacus.scale,
+ color),
+ 2*BHEIGHT*self.abacus.scale,
+ 1.0/pow(10,i-10)))
for r in self.rods:
r.type = "frame"
- for i in self.beads:
- i.type = 'bead'
- i.state = 0
-
- def value(self, count_beads=False):
- """ Override to account for fractions """
- string = ''
- v = []
- value = 0
- for r in range(self.num_rods+1): # +1 for overflow
- v.append(0)
- j = -1
- r = -1
- # Tally the values on each rod.
- for i, b in enumerate(self.beads):
- if j < i:
- r += 1
- j += self.bead_count[r]
- if b.state == 1:
- v[r+1] += 1
-
- if count_beads:
- # Save the number of beads on each rod as a 2-byte int.
- for j in v[1:]:
- string += "%2d" % (j)
- else:
- for r in range(self.num_rods):
- if r < 10:
- value += pow(10, 9-r)*v[r+1]
- elif r == 10: # short rod
- value += float(0.25*v[r+1])
- else:
- value += float(v[r+1])/pow(10, 5-(self.num_rods-r))
- string = str(int(value))
- if value-int(value) > 0: # if it is float...
- string = str(value)
+ def move_bead(self, sprite, dy):
+ """ Move a bead (or beads) up or down a rod. """
- return(string)
+ # find the bead associated with the sprite
+ i = -1
+ for bead in self.beads:
+ if sprite == bead.spr:
+ i = self.beads.index(bead)
+ break
+ if i == -1:
+ print "bead not found"
+ return
- def set_rod_value(self, r, v):
- """ Move beads on rod r to represent value v """
- o = self.bot_beads - self.bead_count[r] + 2
- beads = self.bead_count[r]
- bead_index = 0
- if r > 0:
- for i in range(r):
- bead_index += self.bead_count[i]
-
- # Clear the rod.
- for i in range(beads):
- if self.beads[bead_index+i].state:
- self.beads[bead_index+i].move_relative((0,
- o*BHEIGHT*self.abacus.scale))
- self.beads[bead_index+i].state = 0
-
- # Set the rod.
- for i in range(v):
- self.beads[bead_index+i].move_relative((0,
- -o*BHEIGHT*self.abacus.scale))
- self.beads[bead_index+i].state = 1
-
- def move_bead(self, bead, dy):
- """ Override to account for short rods """
- i = self.beads.index(bead)
# Find out which row i corresponds to
count = 0
for r in range(len(self.bead_count)):
@@ -757,38 +735,32 @@ class Schety(AbacusGeneric):
n = self.bead_count[r]
if dy < 0 and bead.state == 0:
- bead.move_relative((0, -o*BHEIGHT*self.abacus.scale))
- bead.state = 1
+ bead.move_up()
# Make sure beads above this bead are also moved.
for ii in range(b+1):
- if self.beads[i-ii].state == 0:
- self.beads[i-ii].move_relative((0,
- -o*BHEIGHT*self.abacus.scale))
- self.beads[i-ii].state = 1
+ if self.beads[i-ii].get_state() == 0:
+ self.beads[i-ii].move_up()
elif dy > 0 and bead.state == 1:
- bead.move_relative((0, o*BHEIGHT*self.abacus.scale))
- bead.state = 0
+ bead.move_down()
# Make sure beads below this bead are also moved.
for ii in range(n-b):
- if self.beads[i+ii].state == 1:
- self.beads[i+ii].move_relative((0,
- o*BHEIGHT*self.abacus.scale))
- self.beads[i+ii].state = 0
+ if self.beads[i+ii].get_state() == 1:
+ self.beads[i+ii].move_down()
class Fractions(Schety):
""" Inherit from Russian abacus. """
- def __init__(self, abacus):
+ def set_parameters(self):
""" Create an abacus with fractions: 15 by 10 (with 1/2, 1/3. 1/4,
1/5, 1/6, 1/8, 1/9, 1/10, 1/12). """
self.bead_count = (10, 10, 10, 10, 10, 10, 2, 3, 4, 5, 6, 8, 9, 10, 12)
- self.abacus = abacus
self.name = "fraction"
self.num_rods = 15
self.top_beads = 0
self.bot_beads = 12
- self.create()
+ self.base = 10
+ self.top_factor = 5
def draw_rods_and_beads(self, x, y):
""" Override default in order to make a short rod """
@@ -818,50 +790,21 @@ class Fractions(Schety):
for b in range(self.bead_count[i]):
if i < 6: # whole-number beads are white
- self.beads.append(Sprite(self.abacus.sprites, x+i*dx+bo, y+\
- (14-self.bead_count[i]+b)*BHEIGHT*\
- self.abacus.scale,
- self.white))
+ self.beads.append(Bead(Sprite(self.abacus.sprites,
+ x+i*dx+bo,
+ y+(14-self.bead_count[i]+b)*\
+ BHEIGHT*self.abacus.scale,
+ self.white),
+ 4*BHEIGHT*self.abacus.scale,
+ pow(10,5-i)))
else: # fraction beads are black
- self.beads.append(Sprite(self.abacus.sprites, x+i*dx+bo, y+\
- (14-self.bead_count[i]+b)*BHEIGHT*\
- self.abacus.scale,
- self.black))
-
+ self.beads.append(Bead(Sprite(self.abacus.sprites,
+ x+i*dx+bo,
+ y+(14-self.bead_count[i]+b)*\
+ BHEIGHT*self.abacus.scale,
+ self.black),
+ (14-self.bead_count[i])*BHEIGHT*\
+ self.abacus.scale,
+ 1.0/self.bead_count[i]))
for r in self.rods:
r.type = "frame"
- for i in self.beads:
- i.type = 'bead'
- i.state = 0
-
- def value(self, count_beads=False):
- """ Override to account for fractions """
- string = ''
- v = []
- value = 0
- for r in range(self.num_rods+1): # +1 for overflow
- v.append(0)
-
- j = -1
- r = -1
- # Tally the values on each rod.
- for i, b in enumerate(self.beads):
- if j < i:
- r += 1
- j += self.bead_count[r]
- if b.state == 1:
- v[r+1] += 1
-
- if count_beads:
- # Save the number of beads on each rod as a 2-byte int.
- for j in v[1:]:
- string += "%2d" % (j)
- else:
- for r in range(self.num_rods):
- if r < 6:
- value += pow(10, 5-r)*v[r+1]
- else:
- value += float(v[r+1])/self.bead_count[r]
- string = str(value)
-
- return(string)
diff --git a/activity/activity.info b/activity/activity.info
index 3c08f44..2b1a5f1 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,6 +1,6 @@
[Activity]
name = Abacus
-activity_version = 7
+activity_version = 8
license = GPLv3
bundle_id = org.sugarlabs.AbacusActivity
exec = sugar-activity AbacusActivity.AbacusActivity
diff --git a/icons/Hoff.svg b/icons/Hoff.svg
new file mode 100644
index 0000000..b72d10c
--- /dev/null
+++ b/icons/Hoff.svg
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.1"
+ width="45"
+ height="45"
+ id="svg2">
+ <defs
+ id="defs41" />
+ <rect
+ width="37.959229"
+ height="43"
+ x="-41.479614"
+ y="1"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="rect4"
+ style="fill:#aaaaaa;stroke:#000000;stroke-width:2" />
+ <line
+ y1="16.5"
+ y2="16.5"
+ x1="44.18692"
+ x2="1.2540125"
+ style="fill:#aaaaaa;stroke:#000000;stroke-width:2"
+ id="line10-4" />
+ <g
+ transform="translate(0,0.06685352)"
+ id="g2971">
+ <line
+ id="line10-68"
+ style="fill:#aaaaaa;stroke:#000000;stroke-width:2;stroke-miterlimit:0;stroke-dasharray:none"
+ x2="6.7392497"
+ x1="6.7392497"
+ y2="4.2606754"
+ y1="40.605618" />
+ <path
+ d="m 10.73925,26.747115 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,30.676521 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,34.605927 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-5-6"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,38.535333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,6.1059274 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-7"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,10.035333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-6"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,22.816439 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-6"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ <g
+ transform="translate(10.448677,0.06685352)"
+ id="g2971-9">
+ <line
+ id="line10-68-3"
+ style="fill:#aaaaaa;stroke:#000000;stroke-width:2;stroke-miterlimit:0;stroke-dasharray:none"
+ x2="6.7392497"
+ x1="6.7392497"
+ y2="4.2606754"
+ y1="40.605618" />
+ <path
+ d="m 10.73925,26.747115 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-74"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,30.676521 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-5"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,34.605927 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-5-6-2"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,38.535333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-5"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,6.1059274 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-7-4"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,10.035333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-6-7"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,22.816439 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-6-4"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ <g
+ transform="translate(20.897353,0.06685352)"
+ id="g2971-3">
+ <line
+ id="line10-68-0"
+ style="fill:#aaaaaa;stroke:#000000;stroke-width:2;stroke-miterlimit:0;stroke-dasharray:none"
+ x2="6.7392497"
+ x1="6.7392497"
+ y2="4.2606754"
+ y1="40.605618" />
+ <path
+ d="m 10.73925,26.747115 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-78"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,30.676521 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-68"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,34.605927 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-5-6-8"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,38.535333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-4"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,6.1059274 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-7-3"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,10.035333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-6-1"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,22.816439 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-6-49"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ <g
+ transform="translate(31.346028,0.06685352)"
+ id="g2971-0">
+ <line
+ id="line10-68-6"
+ style="fill:#aaaaaa;stroke:#000000;stroke-width:2;stroke-miterlimit:0;stroke-dasharray:none"
+ x2="6.7392497"
+ x1="6.7392497"
+ y2="4.2606754"
+ y1="40.605618" />
+ <path
+ d="m 10.73925,26.747115 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-8"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,30.676521 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-9"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,34.605927 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-5-6-26"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,38.535333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-64"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,6.1059274 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-7-9"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,10.035333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-6-5"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,22.816439 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-6-0"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ <text
+ x="6.6621094"
+ y="31.236328"
+ id="text2852"
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"><tspan
+ x="6.6621094"
+ y="31.236328"
+ id="tspan2854"
+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans">16</tspan></text>
+</svg>
diff --git a/icons/Hon.svg b/icons/Hon.svg
new file mode 100644
index 0000000..b087743
--- /dev/null
+++ b/icons/Hon.svg
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ version="1.1"
+ width="45"
+ height="45"
+ id="svg2">
+ <defs
+ id="defs41" />
+ <rect
+ width="37.959229"
+ height="43"
+ x="-41.479614"
+ y="1"
+ transform="matrix(0,-1,1,0,0,0)"
+ id="rect4"
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2" />
+ <line
+ y1="16.5"
+ y2="16.5"
+ x1="44.18692"
+ x2="1.2540125"
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:2"
+ id="line10-4" />
+ <g
+ transform="translate(0,0.06685352)"
+ id="g2971">
+ <line
+ id="line10-68"
+ style="fill:#aaaaaa;stroke:#000000;stroke-width:2;stroke-miterlimit:0;stroke-dasharray:none"
+ x2="6.7392497"
+ x1="6.7392497"
+ y2="4.2606754"
+ y1="40.605618" />
+ <path
+ d="m 10.73925,26.747115 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,30.676521 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,34.605927 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-5-6"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,38.535333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,6.1059274 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-7"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,10.035333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-6"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,22.816439 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-6"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ <g
+ transform="translate(10.448677,0.06685352)"
+ id="g2971-9">
+ <line
+ id="line10-68-3"
+ style="fill:#aaaaaa;stroke:#000000;stroke-width:2;stroke-miterlimit:0;stroke-dasharray:none"
+ x2="6.7392497"
+ x1="6.7392497"
+ y2="4.2606754"
+ y1="40.605618" />
+ <path
+ d="m 10.73925,26.747115 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-74"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,30.676521 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-5"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,34.605927 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-5-6-2"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,38.535333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-5"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,6.1059274 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-7-4"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,10.035333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-6-7"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,22.816439 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-6-4"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ <g
+ transform="translate(20.897353,0.06685352)"
+ id="g2971-3">
+ <line
+ id="line10-68-0"
+ style="fill:#aaaaaa;stroke:#000000;stroke-width:2;stroke-miterlimit:0;stroke-dasharray:none"
+ x2="6.7392497"
+ x1="6.7392497"
+ y2="4.2606754"
+ y1="40.605618" />
+ <path
+ d="m 10.73925,26.747115 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-78"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,30.676521 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-68"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,34.605927 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-5-6-8"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,38.535333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-4"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,6.1059274 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-7-3"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,10.035333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-6-1"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,22.816439 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-6-49"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ <g
+ transform="translate(31.346028,0.06685352)"
+ id="g2971-0">
+ <line
+ id="line10-68-6"
+ style="fill:#aaaaaa;stroke:#000000;stroke-width:2;stroke-miterlimit:0;stroke-dasharray:none"
+ x2="6.7392497"
+ x1="6.7392497"
+ y2="4.2606754"
+ y1="40.605618" />
+ <path
+ d="m 10.73925,26.747115 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-8"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,30.676521 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-9"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,34.605927 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-5-6-26"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,38.535333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-64"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,6.1059274 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-2-7-9"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,10.035333 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-7-6-6-5"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <path
+ d="m 10.73925,22.816439 a 4,1.9646672 0 0 1 -8,0 4,1.9646672 0 1 1 8,0 z"
+ id="path3633-3-49-6-0"
+ style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
+ <text
+ x="6.6621094"
+ y="31.236328"
+ id="text2852"
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;fill:#aaaaaa;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"><tspan
+ x="6.6621094"
+ y="31.236328"
+ id="tspan2854"
+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#aaaaaa;fill-opacity:1;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans">16</tspan></text>
+</svg>