dabo Commit
Revision 4898
Date: 2008-12-29 11:19:42 -0800 (Mon, 29 Dec 2008)
Author: Paul
Trac: http://trac.dabodev.com/changeset/4898
Changed:
U trunk/dabo/lib/reportWriter.py
Log:
Carl Karsten needed to make "2009" for the PyCon badges wide in relation to
height,
so I took his suggestion and added a new property to string objects:
ScalePercent.
The default is (100.0, 100.0) which results in a normally scaled string. But
Carl
will want more like (160.0, 100.0) probably.
Note that the visual display in the editor window won't render the stretch, but
it
will render in the PDF.
Test and let me know!
Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py 2008-12-29 12:07:01 UTC (rev 4897)
+++ trunk/dabo/lib/reportWriter.py 2008-12-29 19:19:42 UTC (rev 4898)
@@ -569,7 +569,10 @@
self.AvailableProps["FontColor"] = toPropDict(tuple, (0, 0, 0),
"""Specifies the color of the text.""")
+ self.AvailableProps["ScalePercent"] = toPropDict(tuple, (100.0,
100.0),
+ """Specifies the scaling of the string. Set to
(150,100) to make it wide.""")
+
class Image(Drawable):
"""Represents an image."""
def initAvailableProps(self):
@@ -947,10 +950,12 @@
fontName = obj.getProp("fontName")
fontSize = obj.getProp("fontSize")
fontColor = obj.getProp("fontColor")
+ scalePercent = [val/100.0 for val in
obj.getProp("scalePercent")]
## Set canvas props based on our props:
c.translate(x, y)
c.rotate(rotation)
+ c.scale(scalePercent[0], scalePercent[1])
c.setLineWidth(borderWidth)
c.setStrokeColor(borderColor)
c.setFillColor(fontColor)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]