mirror of
https://github.com/phooky/Apple-410.git
synced 2024-10-31 21:07:02 +00:00
good enough for text
This commit is contained in:
parent
bae6443d5b
commit
cda0694f04
@ -60,9 +60,9 @@ class Font:
|
||||
for c in s:
|
||||
if c == '\r' or c == '\n':
|
||||
xoff = 0
|
||||
yoff += 100
|
||||
yoff += 10
|
||||
elif c == '\n':
|
||||
xoff += 200
|
||||
xoff += 20
|
||||
else:
|
||||
self.render_char(ctx,c,xoff,yoff)
|
||||
xoff += 10
|
||||
@ -198,6 +198,8 @@ class CairoPlotter:
|
||||
(x,y) = self.context.get_current_point()
|
||||
self.context.save()
|
||||
self.context.translate(x,y)
|
||||
self.context.rotate(math.radians(self.text_theta))
|
||||
self.context.scale(self.text_size/10.0, self.text_size/8.0)
|
||||
sys.stderr.write("text at {} {}\n".format(x,y))
|
||||
self.char_font.render_string(self.context,params)
|
||||
self.context.restore()
|
||||
|
Loading…
Reference in New Issue
Block a user