mirror of
https://github.com/phooky/Apple-410.git
synced 2024-05-31 12:41:28 +00:00
fix for draw-after-vp-update
This commit is contained in:
parent
0e13833b85
commit
8f1d360a44
|
@ -51,7 +51,6 @@ class Font:
|
||||||
ctx.move_to(x,y)
|
ctx.move_to(x,y)
|
||||||
elif cn == 2:
|
elif cn == 2:
|
||||||
ctx.line_to(x,y)
|
ctx.line_to(x,y)
|
||||||
ctx.stroke()
|
|
||||||
|
|
||||||
def render_string(self,ctx,s):
|
def render_string(self,ctx,s):
|
||||||
xoff = 0
|
xoff = 0
|
||||||
|
@ -127,11 +126,13 @@ class CairoPlotter:
|
||||||
self.context.move_to(cp[0],cp[1])
|
self.context.move_to(cp[0],cp[1])
|
||||||
|
|
||||||
def vp(self, params):
|
def vp(self, params):
|
||||||
|
self.finish_path()
|
||||||
l=coordlist(params,4)
|
l=coordlist(params,4)
|
||||||
self.viewport=(l[0],l[1],l[2],l[3])
|
self.viewport=(l[0],l[1],l[2],l[3])
|
||||||
self.update_ctm()
|
self.update_ctm()
|
||||||
|
|
||||||
def wd(self, params):
|
def wd(self, params):
|
||||||
|
self.finish_path()
|
||||||
l=coordlist(params,4)
|
l=coordlist(params,4)
|
||||||
self.window=(l[0],l[1],l[2],l[3])
|
self.window=(l[0],l[1],l[2],l[3])
|
||||||
self.update_ctm()
|
self.update_ctm()
|
||||||
|
@ -236,7 +237,6 @@ class CairoPlotter:
|
||||||
self.context.translate(x,y)
|
self.context.translate(x,y)
|
||||||
self.context.rotate(math.radians(self.text_theta))
|
self.context.rotate(math.radians(self.text_theta))
|
||||||
self.context.scale(self.text_size/10.0, self.text_size/8.0)
|
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.char_font.render_string(self.context,params)
|
||||||
self.context.restore()
|
self.context.restore()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user