diff options
author | Walter Bender <walter@sugarlabs.org> | 2010-09-23 14:37:19 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2010-09-23 14:37:19 (GMT) |
commit | d5f3b2ef1a9b05e5204d1ccccd03192650d77a00 (patch) | |
tree | a728c7bb1241af74a6d374e243ae54be2fce1c09 | |
parent | c075ebf5a45559c5131240e300b00ab6e39d146b (diff) |
fixed macros; extending vertical spacing on all basic blocks
-rw-r--r-- | TurtleArt/tablock.py | 4 | ||||
-rw-r--r-- | TurtleArt/taconstants.py | 334 |
2 files changed, 191 insertions, 147 deletions
diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py index 4075aa1..ccd362d 100644 --- a/TurtleArt/tablock.py +++ b/TurtleArt/tablock.py @@ -36,7 +36,7 @@ from taconstants import EXPANDABLE, EXPANDABLE_BLOCKS, EXPANDABLE_ARGS, \ COLLAPSIBLE_TOP_NO_ARM_NO_LABEL, COLLAPSIBLE_BOTTOM, PORTFOLIO_STYLE_2x2, \ PORTFOLIO_STYLE_1x1, PORTFOLIO_STYLE_2x1, PORTFOLIO_STYLE_1x2, BOX_COLORS, \ STANDARD_STROKE_WIDTH, SELECTED_STROKE_WIDTH, SELECTED_COLOR, \ - BASIC_STYLE_EXTENDED_SMALL + BASIC_STYLE_EXTENDED_VERTICAL from tasprite_factory import SVG, svg_str_to_pixbuf import sprites @@ -361,7 +361,7 @@ class Block: self._make_basic_style_head(svg) elif self.name in BASIC_STYLE_EXTENDED: self._make_basic_style(svg, 16, 16) - elif self.name in BASIC_STYLE_EXTENDED_SMALL: + elif self.name in BASIC_STYLE_EXTENDED_VERTICAL: self._make_basic_style(svg, 0, 4) elif self.name in BASIC_STYLE_HEAD_1ARG: self._make_basic_style_head_1arg(svg) diff --git a/TurtleArt/taconstants.py b/TurtleArt/taconstants.py index 8c6298e..0c04552 100644 --- a/TurtleArt/taconstants.py +++ b/TurtleArt/taconstants.py @@ -187,13 +187,13 @@ DEFAULT_SCALE = 33 BASIC_STYLE_HEAD = ['start', 'hat1', 'hat2', 'restore', 'restoreall'] BASIC_STYLE_HEAD_1ARG = ['hat'] BASIC_STYLE_TAIL = ['stopstack', 'empty'] -BASIC_STYLE = ['clean', 'penup', 'pendown', 'stack1', 'stack2', - 'hideblocks', 'showblocks', 'clearheap', 'printheap', 'kbinput', +BASIC_STYLE = [] +BASIC_STYLE_EXTENDED_VERTICAL = ['clean', 'penup', 'pendown', 'stack1', + 'stack2','hideblocks', 'showblocks', 'clearheap', 'printheap', 'kbinput', 'fullscreen', 'sandwichcollapsed', 'cartesian', 'polar', 'startfill', - 'stopfill', 'readpixel'] + 'stopfill', 'readpixel', 'vspace'] BASIC_STYLE_EXTENDED = ['picturelist', 'picture1x1', 'picture2x2', 'picture2x1', 'picture1x2', 'picture1x1a'] -BASIC_STYLE_EXTENDED_SMALL = ['vspace'] BASIC_STYLE_1ARG = ['forward', 'back', 'left', 'right', 'seth', 'show', 'image', 'setscale', 'setpensize', 'setcolor', 'setshade', 'print', 'showaligned', 'settextsize', 'settextcolor', 'print', 'wait', 'storeinbox1', 'savepix', @@ -939,157 +939,201 @@ MACROS = { [10, ['number', '1'], 0, 0, [9, None]]], 'picturelist': [[0, 'sandwichtop_no_label', 0, 0, [None, 1]], - [1, 'setxy', 0, 0, [0, 2, 3, 4]], - [2, 'titlex', 0, 0, [1, None]], - [3, 'titley', 0, 0, [1, None]], - [4, 'setscale', 0, 0, [1, 5, 6]], - [5, ['number', '100'], 0, 0, [4, None]], - [6, 'show', 0, 0, [4, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setxy', 0, 0, [6, 9, 10, 11]], - [9, 'leftx', 0, 0, [8, None]], - [10, 'topy', 0, 0, [8, None]], - [11, 'setscale', 0, 0, [8, 12, 13]], - [12, ['number', '67'], 0, 0, [11, None]], - [13, 'list', 0, 0, [11, 14, 15, 16]], - [14, ['string','∙ '], 0, 0, [13, None]], - [15, ['string','∙ '], 0, 0, [13, None]], - [16, 'sandwichbottom', 0, 0, [13, None]]], + [1, 'penup', 0, 0, [0, 2]], + [2, 'setxy', 0, 0, [1, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'pendown', 0, 0, [2, 6]], + [6, 'setscale', 0, 0, [5, 7, 8]], + [7, ['number', '100'], 0, 0, [6, None]], + [8, 'show', 0, 0, [6, 9, 10]], + [9, ['string',_('Title')], 0, 0, [8, None]], + [10, 'penup', 0, 0, [8, 11]], + [11, 'setxy', 0, 0, [10, 12, 13, 14]], + [12, 'leftx', 0, 0, [11, None]], + [13, 'topy', 0, 0, [11, None]], + [14, 'pendown', 0, 0, [11, 15]], + [15, 'setscale', 0, 0, [14, 16, 17]], + [16, ['number', '67'], 0, 0, [15, None]], + [17, 'list', 0, 0, [15, 18, 19, 20]], + [18, ['string','∙ '], 0, 0, [17, None]], + [19, ['string','∙ '], 0, 0, [17, None]], + [20, 'sandwichbottom', 0, 0, [17, None]]], 'picture1x1a': [[0, 'sandwichtop_no_label', 0, 0, [None, 1]], - [1, 'setxy', 0, 0, [0, 2, 3, 4]], - [2, 'titlex', 0, 0, [1, None]], - [3, 'titley', 0, 0, [1, None]], - [4, 'setscale', 0, 0, [1, 5, 6]], - [5, ['number', '100'], 0, 0, [4, None]], - [6, 'show', 0, 0, [4, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setscale', 0, 0, [6, 9, 10]], - [9, ['number', '90'], 0, 0, [8, None]], - [10, 'setxy', 0, 0, [8, 11, 12, 13]], - [11, 'leftx', 0, 0, [10, None]], - [12, 'topy', 0, 0, [10, None]], - [13, 'showaligned', 0, 0, [10, 14, 15]], - [14, 'journal', 0, 0, [13, None]], - [15, 'sandwichbottom', 0, 0, [13, None]]], + [1, 'penup', 0, 0, [0, 2]], + [2, 'setxy', 0, 0, [1, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'pendown', 0, 0, [2, 6]], + [6, 'setscale', 0, 0, [5, 7, 8]], + [7, ['number', '100'], 0, 0, [6, None]], + [8, 'show', 0, 0, [6, 9, 10]], + [9, ['string',_('Title')], 0, 0, [8, None]], + [10, 'penup', 0, 0, [8, 11]], + [11, 'setxy', 0, 0, [10, 12, 13, 14]], + [12, 'leftx', 0, 0, [11, None]], + [13, 'topy', 0, 0, [11, None]], + [14, 'pendown', 0, 0, [11, 15]], + [15, 'setscale', 0, 0, [14, 16, 17]], + [16, ['number', '90'], 0, 0, [15, None]], + [17, 'showaligned', 0, 0, [15, 18, 19]], + [18, 'journal', 0, 0, [17, None]], + [19, 'sandwichbottom', 0, 0, [17, None]]], 'picture2x2': [[0, 'sandwichtop_no_label', 0, 0, [None, 1]], - [1, 'setxy', 0, 0, [0, 2, 3, 4]], - [2, 'titlex', 0, 0, [1, None]], - [3, 'titley', 0, 0, [1, None]], - [4, 'setscale', 0, 0, [1, 5, 6]], - [5, ['number', '100'], 0, 0, [4, None]], - [6, 'show', 0, 0, [4, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setscale', 0, 0, [6, 9, 10]], - [9, ['number', '35'], 0, 0, [8, None]], - [10, 'setxy', 0, 0, [8, 11, 12, 13]], - [11, 'leftx', 0, 0, [10, None]], - [12, 'topy', 0, 0, [10, None]], - [13, 'showaligned', 0, 0, [10, 14, 15]], - [14, 'journal', 0, 0, [13, None]], - [15, 'setxy', 0, 0, [13, 16, 17, 18]], - [16, 'rightx', 0, 0, [15, None]], - [17, 'topy', 0, 0, [15, None]], - [18, 'showaligned', 0, 0, [15, 19, 20]], - [19, 'journal', 0, 0, [18, None]], - [20, 'setxy', 0, 0, [18, 21, 22, 23]], - [21, 'leftx', 0, 0, [20, None]], - [22, 'bottomy', 0, 0, [20, None]], - [23, 'showaligned', 0, 0, [20, 24, 25]], - [24, 'journal', 0, 0, [23, None]], - [25, 'setxy', 0, 0, [23, 26, 27, 28]], - [26, 'rightx', 0, 0, [25, None]], - [27, 'bottomy', 0, 0, [25, None]], - [28, 'showaligned', 0, 0, [25, 29, 30]], - [29, 'journal', 0, 0, [28, None]], - [30, 'sandwichbottom', 0, 0, [28, None]]], + [1, 'penup', 0, 0, [0, 2]], + [2, 'setxy', 0, 0, [1, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'pendown', 0, 0, [2, 6]], + [6, 'setscale', 0, 0, [5, 7, 8]], + [7, ['number', '100'], 0, 0, [6, None]], + [8, 'show', 0, 0, [6, 9, 10]], + [9, ['string',_('Title')], 0, 0, [8, None]], + [10, 'setscale', 0, 0, [8, 11, 12]], + [11, ['number', '35'], 0, 0, [10, None]], + [12, 'penup', 0, 0, [10, 13]], + [13, 'setxy', 0, 0, [12, 14, 15, 16]], + [14, 'leftx', 0, 0, [13, None]], + [15, 'topy', 0, 0, [13, None]], + [16, 'pendown', 0, 0, [13, 17]], + [17, 'showaligned', 0, 0, [16, 18, 19]], + [18, 'journal', 0, 0, [17, None]], + [19, 'penup', 0, 0, [17, 20]], + [20, 'setxy', 0, 0, [19, 21, 22, 23]], + [21, 'rightx', 0, 0, [20, None]], + [22, 'topy', 0, 0, [20, None]], + [23, 'pendown', 0, 0, [20, 24]], + [24, 'showaligned', 0, 0, [23, 25, 26]], + [25, 'journal', 0, 0, [24, None]], + [26, 'penup', 0, 0, [24, 27]], + [27, 'setxy', 0, 0, [26, 28, 29, 30]], + [28, 'leftx', 0, 0, [27, None]], + [29, 'bottomy', 0, 0, [27, None]], + [30, 'pendown', 0, 0, [27, 31]], + [31, 'showaligned', 0, 0, [30, 32, 33]], + [32, 'journal', 0, 0, [31, None]], + [33, 'penup', 0, 0, [31, 34]], + [34, 'setxy', 0, 0, [33, 35, 36, 37]], + [35, 'rightx', 0, 0, [34, None]], + [36, 'bottomy', 0, 0, [34, None]], + [37, 'pendown', 0, 0, [34, 38]], + [38, 'showaligned', 0, 0, [37, 39, 40]], + [39, 'journal', 0, 0, [38, None]], + [40, 'sandwichbottom', 0, 0, [38, None]]], 'picture1x2': [[0, 'sandwichtop_no_label', 0, 0, [None, 1]], - [1, 'setxy', 0, 0, [0, 2, 3, 4]], - [2, 'titlex', 0, 0, [1, None]], - [3, 'titley', 0, 0, [1, None]], - [4, 'setscale', 0, 0, [1, 5, 6]], - [5, ['number', '100'], 0, 0, [4, None]], - [6, 'show', 0, 0, [4, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setscale', 0, 0, [6, 9, 10]], - [9, ['number', '35'], 0, 0, [8, None]], - [10, 'setxy', 0, 0, [8, 11, 12, 13]], - [11, 'leftx', 0, 0, [10, None]], - [12, 'topy', 0, 0, [10, None]], - [13, 'showaligned', 0, 0, [10, 14, 15]], - [14, 'journal', 0, 0, [13, None]], - [15, 'setxy', 0, 0, [13, 16, 17, 18]], - [16, 'rightx', 0, 0, [15, None]], - [17, 'topy', 0, 0, [15, None]], - [18, 'showaligned', 0, 0, [15, 19, 20]], - [19, 'description', 0, 0, [18, None]], - [20, 'setxy', 0, 0, [18, 21, 22, 23]], - [21, 'leftx', 0, 0, [20, None]], - [22, 'bottomy', 0, 0, [20, None]], - [23, 'showaligned', 0, 0, [20, 24, 25]], - [24, 'journal', 0, 0, [23, None]], - [25, 'setxy', 0, 0, [23, 26, 27, 28]], - [26, 'rightx', 0, 0, [25, None]], - [27, 'bottomy', 0, 0, [25, None]], - [28, 'showaligned', 0, 0, [25, 29, 30]], - [29, 'description', 0, 0, [28, None]], - [30, 'sandwichbottom', 0, 0, [28, None]]], + [1, 'penup', 0, 0, [0, 2]], + [2, 'setxy', 0, 0, [1, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'pendown', 0, 0, [2, 6]], + [6, 'setscale', 0, 0, [5, 7, 8]], + [7, ['number', '100'], 0, 0, [6, None]], + [8, 'show', 0, 0, [6, 9, 10]], + [9, ['string',_('Title')], 0, 0, [8, None]], + [10, 'setscale', 0, 0, [8, 11, 12]], + [11, ['number', '35'], 0, 0, [10, None]], + [12, 'penup', 0, 0, [10, 13]], + [13, 'setxy', 0, 0, [12, 14, 15, 16]], + [14, 'leftx', 0, 0, [13, None]], + [15, 'topy', 0, 0, [13, None]], + [16, 'pendown', 0, 0, [13, 17]], + [17, 'showaligned', 0, 0, [16, 18, 19]], + [18, 'journal', 0, 0, [17, None]], + [19, 'penup', 0, 0, [17, 20]], + [20, 'setxy', 0, 0, [19, 21, 22, 23]], + [21, 'rightx', 0, 0, [20, None]], + [22, 'topy', 0, 0, [20, None]], + [23, 'pendown', 0, 0, [20, 24]], + [24, 'showaligned', 0, 0, [23, 25, 26]], + [25, 'description', 0, 0, [24, None]], + [26, 'penup', 0, 0, [24, 27]], + [27, 'setxy', 0, 0, [26, 28, 29, 30]], + [28, 'leftx', 0, 0, [27, None]], + [29, 'bottomy', 0, 0, [27, None]], + [30, 'pendown', 0, 0, [27, 31]], + [31, 'showaligned', 0, 0, [30, 32, 33]], + [32, 'journal', 0, 0, [31, None]], + [33, 'penup', 0, 0, [31, 34]], + [34, 'setxy', 0, 0, [33, 35, 36, 37]], + [35, 'rightx', 0, 0, [34, None]], + [36, 'bottomy', 0, 0, [34, None]], + [37, 'pendown', 0, 0, [34, 38]], + [38, 'showaligned', 0, 0, [37, 39, 40]], + [39, 'description', 0, 0, [38, None]], + [40, 'sandwichbottom', 0, 0, [38, None]]], 'picture2x1': [[0, 'sandwichtop_no_label', 0, 0, [None, 1]], - [1, 'setxy', 0, 0, [0, 2, 3, 4]], - [2, 'titlex', 0, 0, [1, None]], - [3, 'titley', 0, 0, [1, None]], - [4, 'setscale', 0, 0, [1, 5, 6]], - [5, ['number', '100'], 0, 0, [4, None]], - [6, 'show', 0, 0, [4, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setscale', 0, 0, [6, 9, 10]], - [9, ['number', '35'], 0, 0, [8, None]], - [10, 'setxy', 0, 0, [8, 11, 12, 13]], - [11, 'leftx', 0, 0, [10, None]], - [12, 'topy', 0, 0, [10, None]], - [13, 'showaligned', 0, 0, [10, 14, 15]], - [14, 'journal', 0, 0, [13, None]], - [15, 'setxy', 0, 0, [13, 16, 17, 18]], - [16, 'rightx', 0, 0, [15, None]], - [17, 'topy', 0, 0, [15, None]], - [18, 'showaligned', 0, 0, [15, 19, 20]], - [19, 'journal', 0, 0, [18, None]], - [20, 'setxy', 0, 0, [18, 21, 22, 23]], - [21, 'leftx', 0, 0, [20, None]], - [22, 'bottomy', 0, 0, [20, None]], - [23, 'showaligned', 0, 0, [20, 24, 25]], - [24, 'description', 0, 0, [23, None]], - [25, 'setxy', 0, 0, [23, 26, 27, 28]], - [26, 'rightx', 0, 0, [25, None]], - [27, 'bottomy', 0, 0, [25, None]], - [28, 'showaligned', 0, 0, [25, 29, 30]], - [29, 'description', 0, 0, [28, None]], - [30, 'sandwichbottom', 0, 0, [28, None]]], + [1, 'penup', 0, 0, [0, 2]], + [2, 'setxy', 0, 0, [1, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'pendown', 0, 0, [2, 6]], + [6, 'setscale', 0, 0, [5, 7, 8]], + [7, ['number', '100'], 0, 0, [6, None]], + [8, 'show', 0, 0, [6, 9, 10]], + [9, ['string',_('Title')], 0, 0, [8, None]], + [10, 'setscale', 0, 0, [8, 11, 12]], + [11, ['number', '35'], 0, 0, [10, None]], + [12, 'penup', 0, 0, [10, 13]], + [13, 'setxy', 0, 0, [12, 14, 15, 16]], + [14, 'leftx', 0, 0, [13, None]], + [15, 'topy', 0, 0, [13, None]], + [16, 'pendown', 0, 0, [13, 17]], + [17, 'showaligned', 0, 0, [16, 18, 19]], + [18, 'journal', 0, 0, [17, None]], + [19, 'penup', 0, 0, [17, 20]], + [20, 'setxy', 0, 0, [19, 21, 22, 23]], + [21, 'rightx', 0, 0, [20, None]], + [22, 'topy', 0, 0, [20, None]], + [23, 'pendown', 0, 0, [20, 24]], + [24, 'showaligned', 0, 0, [23, 25, 26]], + [25, 'journal', 0, 0, [24, None]], + [26, 'penup', 0, 0, [24, 27]], + [27, 'setxy', 0, 0, [26, 28, 29, 30]], + [28, 'leftx', 0, 0, [27, None]], + [29, 'bottomy', 0, 0, [27, None]], + [30, 'pendown', 0, 0, [27, 31]], + [31, 'showaligned', 0, 0, [30, 32, 33]], + [32, 'description', 0, 0, [31, None]], + [33, 'penup', 0, 0, [31, 34]], + [34, 'setxy', 0, 0, [33, 35, 36, 37]], + [35, 'rightx', 0, 0, [34, None]], + [36, 'bottomy', 0, 0, [34, None]], + [37, 'pendown', 0, 0, [34, 38]], + [38, 'showaligned', 0, 0, [37, 39, 40]], + [39, 'description', 0, 0, [38, None]], + [40, 'sandwichbottom', 0, 0, [38, None]]], 'picture1x1': [[0, 'sandwichtop_no_label', 0, 0, [None, 1]], - [1, 'setxy', 0, 0, [0, 2, 3, 4]], - [2, 'titlex', 0, 0, [1, None]], - [3, 'titley', 0, 0, [1, None]], - [4, 'setscale', 0, 0, [1, 5, 6]], - [5, ['number', '100'], 0, 0, [4, None]], - [6, 'show', 0, 0, [4, 7, 8]], - [7, ['string',_('Title')], 0, 0, [6, None]], - [8, 'setscale', 0, 0, [6, 9, 10]], - [9, ['number', '35'], 0, 0, [8, None]], - [10, 'setxy', 0, 0, [8, 11, 12, 13]], - [11, 'leftx', 0, 0, [10, None]], - [12, 'topy', 0, 0, [10, None]], - [13, 'showaligned', 0, 0, [10, 14, 15]], - [14, 'journal', 0, 0, [13, None]], - [15, 'setxy', 0, 0, [13, 16, 17, 18]], - [16, 'rightx', 0, 0, [15, None]], - [17, 'topy', 0, 0, [15, None]], - [18, 'showaligned', 0, 0, [15, 19, 20]], - [19, 'description', 0, 0, [18, None]], - [20, 'sandwichbottom', 0, 0, [18, None]]], + [1, 'penup', 0, 0, [0, 2]], + [2, 'setxy', 0, 0, [1, 3, 4, 5]], + [3, 'titlex', 0, 0, [2, None]], + [4, 'titley', 0, 0, [2, None]], + [5, 'pendown', 0, 0, [2, 6]], + [6, 'setscale', 0, 0, [5, 7, 8]], + [7, ['number', '100'], 0, 0, [6, None]], + [8, 'show', 0, 0, [6, 9, 10]], + [9, ['string',_('Title')], 0, 0, [8, None]], + [10, 'setscale', 0, 0, [8, 11, 12]], + [11, ['number', '35'], 0, 0, [10, None]], + [12, 'penup', 0, 0, [10, 13]], + [13, 'setxy', 0, 0, [12, 14, 15, 16]], + [14, 'leftx', 0, 0, [13, None]], + [15, 'topy', 0, 0, [13, None]], + [16, 'pendown', 0, 0, [13, 17]], + [17, 'showaligned', 0, 0, [16, 18, 19]], + [18, 'journal', 0, 0, [17, None]], + [19, 'penup', 0, 0, [17, 20]], + [20, 'setxy', 0, 0, [19, 21, 22, 23]], + [21, 'rightx', 0, 0, [20, None]], + [22, 'topy', 0, 0, [20, None]], + [23, 'pendown', 0, 0, [20, 24]], + [24, 'showaligned', 0, 0, [23, 25, 26]], + [25, 'description', 0, 0, [24, None]], + [26, 'sandwichbottom', 0, 0, [24, None]]], 'reskin': [[0, 'skin', 0, 0, [None, 1, None]], [1, 'journal', 0, 0, [0, None]]] |