projects
/
experiments
/
RadialSymmetry.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f14a044
)
Diagram.py: allow changing the font size
author
Antonio Ospite <ao2@ao2.it>
Thu, 18 Jun 2015 09:30:59 +0000
(11:30 +0200)
committer
Antonio Ospite <ao2@ao2.it>
Thu, 18 Jun 2015 09:30:59 +0000
(11:30 +0200)
Diagram.py
patch
|
blob
|
history
diff --git
a/Diagram.py
b/Diagram.py
index
fa35d32
..
7d6348b
100755
(executable)
--- a/
Diagram.py
+++ b/
Diagram.py
@@
-23,7
+23,7
@@
from math import *
class Diagram(object):
class Diagram(object):
- def __init__(self, width, height, background=[1, 1, 1]):
+ def __init__(self, width, height, background=[1, 1, 1]
, font_size=20
):
self.width = width
self.height = height
self.background = background
self.width = width
self.height = height
self.background = background
@@
-38,7
+38,7
@@
class Diagram(object):
cr.select_font_face("Georgia", cairo.FONT_SLANT_NORMAL,
cairo.FONT_WEIGHT_NORMAL)
cr.select_font_face("Georgia", cairo.FONT_SLANT_NORMAL,
cairo.FONT_WEIGHT_NORMAL)
- cr.set_font_size(
20
)
+ cr.set_font_size(
font_size
)
# Adjust the font matrix to left-bottom origin
M = cr.get_font_matrix()
# Adjust the font matrix to left-bottom origin
M = cr.get_font_matrix()