Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--taconstants.py235
-rw-r--r--talogo.py9
2 files changed, 130 insertions, 114 deletions
diff --git a/taconstants.py b/taconstants.py
index 2dd93fc..47c95ab 100644
--- a/taconstants.py
+++ b/taconstants.py
@@ -876,144 +876,157 @@ MACROS = {
[2, 'setxy', 0, 0, [0, 3, 4, 5]],
[3, 'titlex', 0, 0, [2, None]],
[4, 'titley', 0, 0, [2, None]],
- [5, 'show', 0, 0, [2, 6, 7]],
- [6, ['string',_('Title')], 0, 0, [5, None]],
- [7, 'setxy', 0, 0, [5, 8, 9, 10]],
- [8, 'leftx', 0, 0, [7, None]],
- [9, 'topy', 0, 0, [7, None]],
- [10, 'list', 0, 0, [7, 11, 12, 13]],
- [11, ['string','∙ '], 0, 0, [10, None]],
- [12, ['string','∙ '], 0, 0, [10, None]],
- [13, 'sandwichbottom', 0, 0, [10, None]]],
+ [5, 'setscale', 0, 0, [2, 6, 7]],
+ [6, ['number', '100'], 0, 0, [5, None]],
+ [7, 'show', 0, 0, [5, 8, 9]],
+ [8, ['string',_('Title')], 0, 0, [7, None]],
+ [9, 'setxy', 0, 0, [7, 10, 11, 12]],
+ [10, 'leftx', 0, 0, [9, None]],
+ [11, 'topy', 0, 0, [9, None]],
+ [12, 'setscale', 0, 0, [9, 13, 14]],
+ [13, ['number', '67'], 0, 0, [12, None]],
+ [14, 'list', 0, 0, [12, 15, 16, 17]],
+ [15, ['string','∙ '], 0, 0, [14, None]],
+ [16, ['string','∙ '], 0, 0, [14, None]],
+ [17, 'sandwichbottom', 0, 0, [14, None]]],
'picture1x1a':
[[0, 'sandwichtop', 0, 0, [None, 1, 2]],
[1, ['string', _('picture')], 0, 0, [0, None]],
[2, 'setxy', 0, 0, [0, 3, 4, 5]],
[3, 'titlex', 0, 0, [2, None]],
[4, 'titley', 0, 0, [2, None]],
- [5, 'show', 0, 0, [2, 6, 7]],
- [6, ['string',_('Title')], 0, 0, [5, None]],
- [7, 'setscale', 0, 0, [5, 8, 9]],
- [8, ['number', '90'], 0, 0, [7, None]],
- [9, 'setxy', 0, 0, [7, 10, 11, 12]],
- [10, 'leftx', 0, 0, [9, None]],
- [11, 'topy', 0, 0, [9, None]],
- [12, 'showaligned', 0, 0, [9, 13, 14]],
- [13, 'journal', 0, 0, [12, None]],
- [14, 'sandwichbottom', 0, 0, [12, None]]],
+ [5, 'setscale', 0, 0, [2, 6, 7]],
+ [6, ['number', '100'], 0, 0, [5, None]],
+ [7, 'show', 0, 0, [5, 8, 9]],
+ [8, ['string',_('Title')], 0, 0, [7, None]],
+ [9, 'setscale', 0, 0, [7, 10, 11]],
+ [10, ['number', '90'], 0, 0, [9, None]],
+ [11, 'setxy', 0, 0, [9, 12, 13, 14]],
+ [12, 'leftx', 0, 0, [11, None]],
+ [13, 'topy', 0, 0, [11, None]],
+ [14, 'showaligned', 0, 0, [11, 15, 16]],
+ [15, 'journal', 0, 0, [14, None]],
+ [16, 'sandwichbottom', 0, 0, [14, None]]],
'picture2x2':
[[0, 'sandwichtop', 0, 0, [None, 1, 2]],
[1, ['string', _('2×2 pictures')], 0, 0, [0, None]],
[2, 'setxy', 0, 0, [0, 3, 4, 5]],
[3, 'titlex', 0, 0, [2, None]],
[4, 'titley', 0, 0, [2, None]],
- [5, 'show', 0, 0, [2, 6, 7]],
- [6, ['string',_('Title')], 0, 0, [5, None]],
- [7, 'setscale', 0, 0, [5, 8, 9]],
- [8, ['number', '35'], 0, 0, [7, None]],
- [9, 'setxy', 0, 0, [7, 10, 11, 12]],
- [10, 'leftx', 0, 0, [9, None]],
- [11, 'topy', 0, 0, [9, None]],
- [12, 'showaligned', 0, 0, [9, 13, 14]],
- [13, 'journal', 0, 0, [12, None]],
- [14, 'setxy', 0, 0, [12, 15, 16, 17]],
- [15, 'rightx', 0, 0, [14, None]],
- [16, 'topy', 0, 0, [14, None]],
- [17, 'showaligned', 0, 0, [14, 18, 19]],
- [18, 'journal', 0, 0, [17, None]],
- [19, 'setxy', 0, 0, [17, 20, 21, 22]],
- [20, 'leftx', 0, 0, [19, None]],
- [21, 'bottomy', 0, 0, [19, None]],
- [22, 'showaligned', 0, 0, [19, 23, 24]],
- [23, 'journal', 0, 0, [22, None]],
- [24, 'setxy', 0, 0, [22, 25, 26, 27]],
- [25, 'rightx', 0, 0, [24, None]],
- [26, 'bottomy', 0, 0, [24, None]],
- [27, 'showaligned', 0, 0, [24, 28, 29]],
- [28, 'journal', 0, 0, [27, None]],
- [29, 'sandwichbottom', 0, 0, [27, None]]],
+ [5, 'setscale', 0, 0, [2, 6, 7]],
+ [6, ['number', '100'], 0, 0, [5, None]],
+ [7, 'show', 0, 0, [5, 8, 9]],
+ [8, ['string',_('Title')], 0, 0, [7, None]],
+ [9, 'setscale', 0, 0, [7, 10, 11]],
+ [10, ['number', '35'], 0, 0, [9, None]],
+ [11, 'setxy', 0, 0, [9, 12, 13, 14]],
+ [12, 'leftx', 0, 0, [11, None]],
+ [13, 'topy', 0, 0, [11, None]],
+ [14, 'showaligned', 0, 0, [11, 15, 16]],
+ [15, 'journal', 0, 0, [14, None]],
+ [16, 'setxy', 0, 0, [14, 17, 18, 19]],
+ [17, 'rightx', 0, 0, [16, None]],
+ [18, 'topy', 0, 0, [16, None]],
+ [19, 'showaligned', 0, 0, [16, 20, 21]],
+ [20, 'journal', 0, 0, [19, None]],
+ [21, 'setxy', 0, 0, [19, 22, 23, 24]],
+ [22, 'leftx', 0, 0, [21, None]],
+ [23, 'bottomy', 0, 0, [21, None]],
+ [24, 'showaligned', 0, 0, [21, 25, 26]],
+ [25, 'journal', 0, 0, [24, None]],
+ [26, 'setxy', 0, 0, [24, 27, 28, 29]],
+ [27, 'rightx', 0, 0, [26, None]],
+ [28, 'bottomy', 0, 0, [26, None]],
+ [29, 'showaligned', 0, 0, [26, 30, 31]],
+ [30, 'journal', 0, 0, [29, None]],
+ [31, 'sandwichbottom', 0, 0, [29, None]]],
'picture2x1':
[[0, 'sandwichtop', 0, 0, [None, 1, 2]],
[1, ['string', _('2×1 pictures')], 0, 0, [0, None]],
[2, 'setxy', 0, 0, [0, 3, 4, 5]],
[3, 'titlex', 0, 0, [2, None]],
[4, 'titley', 0, 0, [2, None]],
- [5, 'show', 0, 0, [2, 6, 7]],
- [6, ['string',_('Title')], 0, 0, [5, None]],
- [7, 'setscale', 0, 0, [5, 8, 9]],
- [8, ['number', '35'], 0, 0, [7, None]],
- [9, 'setxy', 0, 0, [7, 10, 11, 12]],
- [10, 'leftx', 0, 0, [9, None]],
- [11, 'topy', 0, 0, [9, None]],
- [12, 'showaligned', 0, 0, [9, 13, 14]],
- [13, 'journal', 0, 0, [12, None]],
- [14, 'setxy', 0, 0, [12, 15, 16, 17]],
- [15, 'leftx', 0, 0, [14, None]],
- [16, 'bottomy', 0, 0, [14, None]],
- [17, 'showaligned', 0, 0, [14, 18, 19]],
- [18, 'description', 0, 0, [17, None]],
- [19, 'setxy', 0, 0, [17, 20, 21, 22]],
- [20, 'rightx', 0, 0, [19, None]],
- [21, 'topy', 0, 0, [19, None]],
- [22, 'showaligned', 0, 0, [19, 23, 24]],
- [23, 'journal', 0, 0, [22, None]],
- [24, 'setxy', 0, 0, [22, 25, 26, 27]],
- [25, 'rightx', 0, 0, [24, None]],
- [26, 'bottomy', 0, 0, [24, None]],
- [27, 'showaligned', 0, 0, [24, 28, 29]],
- [28, 'description', 0, 0, [27, None]],
- [29, 'sandwichbottom', 0, 0, [27, None]]],
+ [5, 'setscale', 0, 0, [2, 6, 7]],
+ [6, ['number', '100'], 0, 0, [5, None]],
+ [7, 'show', 0, 0, [5, 8, 9]],
+ [8, ['string',_('Title')], 0, 0, [7, None]],
+ [9, 'setscale', 0, 0, [7, 10, 11]],
+ [10, ['number', '35'], 0, 0, [9, None]],
+ [11, 'setxy', 0, 0, [9, 12, 13, 14]],
+ [12, 'leftx', 0, 0, [11, None]],
+ [13, 'topy', 0, 0, [11, None]],
+ [14, 'showaligned', 0, 0, [11, 15, 16]],
+ [15, 'journal', 0, 0, [14, None]],
+ [16, 'setxy', 0, 0, [14, 17, 18, 19]],
+ [17, 'leftx', 0, 0, [16, None]],
+ [18, 'bottomy', 0, 0, [16, None]],
+ [19, 'showaligned', 0, 0, [16, 20, 21]],
+ [20, 'description', 0, 0, [19, None]],
+ [21, 'setxy', 0, 0, [19, 22, 23, 24]],
+ [22, 'rightx', 0, 0, [21, None]],
+ [23, 'topy', 0, 0, [21, None]],
+ [24, 'showaligned', 0, 0, [21, 25, 26]],
+ [25, 'journal', 0, 0, [24, None]],
+ [26, 'setxy', 0, 0, [24, 27, 28, 29]],
+ [27, 'rightx', 0, 0, [26, None]],
+ [28, 'bottomy', 0, 0, [26, None]],
+ [29, 'showaligned', 0, 0, [26, 30, 31]],
+ [30, 'description', 0, 0, [29, None]],
+ [31, 'sandwichbottom', 0, 0, [29, None]]],
'picture1x2':
[[0, 'sandwichtop', 0, 0, [None, 1, 2]],
[1, ['string', _('1×2 pictures')], 0, 0, [0, None]],
[2, 'setxy', 0, 0, [0, 3, 4, 5]],
[3, 'titlex', 0, 0, [2, None]],
[4, 'titley', 0, 0, [2, None]],
- [5, 'show', 0, 0, [2, 6, 7]],
- [6, ['string',_('Title')], 0, 0, [5, None]],
- [7, 'setscale', 0, 0, [5, 8, 9]],
- [8, ['number', '35'], 0, 0, [7, None]],
- [9, 'setxy', 0, 0, [7, 10, 11, 12]],
- [10, 'leftx', 0, 0, [9, None]],
- [11, 'topy', 0, 0, [9, None]],
- [12, 'showaligned', 0, 0, [9, 13, 14]],
- [13, 'journal', 0, 0, [12, None]],
- [14, 'setxy', 0, 0, [12, 15, 16, 17]],
- [15, 'rightx', 0, 0, [14, None]],
- [16, 'topy', 0, 0, [14, None]],
- [17, 'showaligned', 0, 0, [14, 18, 19]],
- [18, 'description', 0, 0, [17, None]],
- [19, 'setxy', 0, 0, [17, 20, 21, 22]],
- [20, 'leftx', 0, 0, [19, None]],
- [21, 'bottomy', 0, 0, [19, None]],
- [22, 'showaligned', 0, 0, [19, 23, 24]],
- [23, 'journal', 0, 0, [22, None]],
- [24, 'setxy', 0, 0, [22, 25, 26, 27]],
- [25, 'rightx', 0, 0, [24, None]],
- [26, 'bottomy', 0, 0, [24, None]],
- [27, 'showaligned', 0, 0, [24, 28, 29]],
- [28, 'description', 0, 0, [27, None]],
- [29, 'sandwichbottom', 0, 0, [27, None]]],
+ [5, 'setscale', 0, 0, [2, 6, 7]],
+ [6, ['number', '100'], 0, 0, [5, None]],
+ [7, 'show', 0, 0, [5, 8, 9]],
+ [8, ['string',_('Title')], 0, 0, [7, None]],
+ [9, 'setscale', 0, 0, [7, 10, 11]],
+ [10, ['number', '35'], 0, 0, [9, None]],
+ [11, 'setxy', 0, 0, [9, 12, 13, 14]],
+ [12, 'leftx', 0, 0, [11, None]],
+ [13, 'topy', 0, 0, [11, None]],
+ [14, 'showaligned', 0, 0, [11, 15, 16]],
+ [15, 'journal', 0, 0, [14, None]],
+ [16, 'setxy', 0, 0, [14, 17, 18, 19]],
+ [17, 'rightx', 0, 0, [16, None]],
+ [18, 'topy', 0, 0, [16, None]],
+ [19, 'showaligned', 0, 0, [16, 20, 21]],
+ [20, 'description', 0, 0, [19, None]],
+ [21, 'setxy', 0, 0, [19, 22, 23, 24]],
+ [22, 'leftx', 0, 0, [21, None]],
+ [23, 'bottomy', 0, 0, [21, None]],
+ [24, 'showaligned', 0, 0, [21, 25, 26]],
+ [25, 'journal', 0, 0, [24, None]],
+ [26, 'setxy', 0, 0, [24, 27, 28, 29]],
+ [27, 'rightx', 0, 0, [26, None]],
+ [28, 'bottomy', 0, 0, [26, None]],
+ [29, 'showaligned', 0, 0, [26, 30, 31]],
+ [30, 'description', 0, 0, [29, None]],
+ [31, 'sandwichbottom', 0, 0, [29, None]]],
'picture1x1':
[[0, 'sandwichtop', 0, 0, [None, 1, 2]],
- [1, ['string', _('1×1 picture')], 0, 0, [0, None]],
+ [1, ['string', _('1×1 pictures')], 0, 0, [0, None]],
[2, 'setxy', 0, 0, [0, 3, 4, 5]],
[3, 'titlex', 0, 0, [2, None]],
[4, 'titley', 0, 0, [2, None]],
- [5, 'show', 0, 0, [2, 6, 7]],
- [6, ['string',_('Title')], 0, 0, [5, None]],
- [7, 'setscale', 0, 0, [5, 8, 9]],
- [8, ['number', '45'], 0, 0, [7, None]],
- [9, 'setxy', 0, 0, [7, 10, 11, 12]],
- [10, 'leftx', 0, 0, [9, None]],
- [11, 'topy', 0, 0, [9, None]],
- [12, 'showaligned', 0, 0, [9, 13, 14]],
- [13, 'journal', 0, 0, [12, None]],
- [14, 'setxy', 0, 0, [12, 15, 16, 17]],
- [15, 'rightx', 0, 0, [14, None]],
- [16, 'topy', 0, 0, [14, None]],
- [17, 'showaligned', 0, 0, [14, 18, 19]],
- [18, 'description', 0, 0, [17, None]],
- [19, 'sandwichbottom', 0, 0, [17, None]]]
+ [5, 'setscale', 0, 0, [2, 6, 7]],
+ [6, ['number', '100'], 0, 0, [5, None]],
+ [7, 'show', 0, 0, [5, 8, 9]],
+ [8, ['string',_('Title')], 0, 0, [7, None]],
+ [9, 'setscale', 0, 0, [7, 10, 11]],
+ [10, ['number', '35'], 0, 0, [9, None]],
+ [11, 'setxy', 0, 0, [9, 12, 13, 14]],
+ [12, 'leftx', 0, 0, [11, None]],
+ [13, 'topy', 0, 0, [11, None]],
+ [14, 'showaligned', 0, 0, [11, 15, 16]],
+ [15, 'journal', 0, 0, [14, None]],
+ [16, 'setxy', 0, 0, [14, 17, 18, 19]],
+ [17, 'rightx', 0, 0, [16, None]],
+ [18, 'topy', 0, 0, [16, None]],
+ [19, 'showaligned', 0, 0, [16, 20, 21]],
+ [20, 'description', 0, 0, [19, None]],
+ [21, 'sandwichbottom', 0, 0, [19, None]]],
}
-
diff --git a/talogo.py b/talogo.py
index b096657..1a2d7cf 100644
--- a/talogo.py
+++ b/talogo.py
@@ -411,6 +411,8 @@ class LogoCode:
self.trace = 0
self.gplay = None
self.ag = None
+
+ # Scale factors for depreciated portfolio blocks
self.title_height = int((self.tw.canvas.height/20)*self.tw.scale)
self.body_height = int((self.tw.canvas.height/40)*self.tw.scale)
self.bullet_height = int((self.tw.canvas.height/30)*self.tw.scale)
@@ -1006,7 +1008,7 @@ class LogoCode:
for s in sarray:
self.tw.canvas.setxy(x, y)
self.show(s)
- y -= int(self.bullet_height*2*self.tw.lead)
+ y -= int(self.tw.textsize*self.tw.lead)
def set_scale(self, x):
self.scale = x
@@ -1114,8 +1116,9 @@ class LogoCode:
self.body_height, int(w))
def draw_title(self, title, x, y):
- self.tw.canvas.draw_text(title,int(x),int(y),self.title_height,
- self.tw.canvas.width-x)
+ self.tw.canvas.draw_text(title, int(x), int(y),
+ self.title_height,
+ self.tw.canvas.width-x)
# image only (at current x,y)
def insert_image(self, media, center):
w = (self.tw.canvas.width * self.scale)/100