Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-02-27 17:18:23 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-02-27 17:18:23 (GMT)
commit725a482f0d7f5f86e4ecdfe83645571aa7d27e09 (patch)
tree07cdb0d73ec3f64a4c9bd4134b1c19d805384dd9
parent73fb4e9ab0d55a0c6c3bf48824dacf3f9272bf35 (diff)
added scale factor to show text
-rw-r--r--taconstants.py6
-rw-r--r--talogo.py8
-rw-r--r--tawindow.py2
3 files changed, 9 insertions, 7 deletions
diff --git a/taconstants.py b/taconstants.py
index 0e0729d..2dd93fc 100644
--- a/taconstants.py
+++ b/taconstants.py
@@ -13,7 +13,7 @@
"""
This file contains the constants that by-in-large determine the
-behavior of Turtle Art. Noteably, the block palettes are defined
+behavior of Turtle Art. Notably, the block palettes are defined
below. If you want to add a new block to Turtle Art, it is generally a
matter of modifying some tables below and then adding the primitive to
talogo.py. For example, if we want to add a new turtle command,
@@ -75,7 +75,7 @@ on the Turtle Palette.
Adding a new palette is simply a matter of: (1) adding an additional
entry to PALETTE_NAMES; (2) new list of blocks to PALETTES; and (3) an
additional entry in COLORS. However you will have to: (4) create icons
-for the palette-selector buttons. These are kept in the images
+for the palette-selector buttons. These are kept in the icons
subdirectory. You need two icons: yourpalettenameoff.svg and
yourpalettenameon.svg, where yourpalettename is the same string as the
entry you added to the PALETTE_NAMES list. Note that the icons should
@@ -554,7 +554,7 @@ DEFAULTS = {
'setpensize':[5],
'setscale':[33],
'setshade':[50],
- 'settextsize':[32],
+ 'settextsize':[48],
'settextcolor':[0],
'setxy':[0, 0],
'show':[_('text')],
diff --git a/talogo.py b/talogo.py
index 1863d17..b096657 100644
--- a/talogo.py
+++ b/talogo.py
@@ -1028,13 +1028,15 @@ class LogoCode:
else:
if center:
y -= self.tw.textsize
- self.tw.canvas.draw_text(string,x,y,self.tw.textsize,
- self.tw.canvas.width-x)
+ self.tw.canvas.draw_text(string, x, y,
+ int(self.tw.textsize*self.scale/100),
+ self.tw.canvas.width-x)
elif type(string) == float or type(string) == int:
string = round_int(string)
if center:
y -= self.tw.textsize
- self.tw.canvas.draw_text(string, x, y, self.tw.textsize,
+ self.tw.canvas.draw_text(string, x, y,
+ int(self.tw.textsize*self.scale/100),
self.tw.canvas.width-x)
def play_sound(self, audio):
diff --git a/tawindow.py b/tawindow.py
index 68753c7..59ab210 100644
--- a/tawindow.py
+++ b/tawindow.py
@@ -130,7 +130,7 @@ class TurtleArtWindow():
self.msgcolor = self.cm.alloc_color('black')
self.fgcolor = self.cm.alloc_color('red')
self.textcolor = self.cm.alloc_color('blue')
- self.textsize = 32
+ self.textsize = 48
self.myblock = None
self.nop = 'nop'
self.loaded = 0