Commit 945c523d authored by Michael Murtaugh's avatar Michael Murtaugh

centered text

parent 1cd21265
......@@ -37,7 +37,7 @@ class RunText(SampleBase):
# len = graphics.DrawText(offscreen_canvas, font, pos, 20, textColor, my_text)
y = pos + line_height
for char in my_text:
cw = font.CharacterWidth(char)
cw = font.CharacterWidth(ord(char))
cx = self.args.margin + ((offscreen_canvas.width - cw) / 2)
graphics.DrawText(offscreen_canvas, font, cx, y, textColor, char)
y += line_height
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment