示例#1
0
文件: t1file.py 项目: mjg/PyX-svn
 def updatepath(self, path, trafo, context):
     dy1 = context.t1stack.pop(0)
     dx2 = context.t1stack.pop(0)
     dy2 = context.t1stack.pop(0)
     dx3 = context.t1stack.pop(0)
     path.append(curveto_pt(*(trafo.apply_pt(context.x,             context.y + dy1) +
                              trafo.apply_pt(context.x + dx2,       context.y + dy1 + dy2) +
                              trafo.apply_pt(context.x + dx2 + dx3, context.y + dy1 + dy2))))
     context.x += dx2+dx3
     context.y += dy1+dy2
示例#2
0
 def updatepath(self, path, trafo, context):
     dy1 = context.t1stack.pop(0)
     dx2 = context.t1stack.pop(0)
     dy2 = context.t1stack.pop(0)
     dx3 = context.t1stack.pop(0)
     path.append(curveto_pt(*(trafo.apply_pt(context.x,             context.y + dy1) +
                              trafo.apply_pt(context.x + dx2,       context.y + dy1 + dy2) +
                              trafo.apply_pt(context.x + dx2 + dx3, context.y + dy1 + dy2))))
     context.x += dx2+dx3
     context.y += dy1+dy2
示例#3
0
文件: t1file.py 项目: mjg/PyX-svn
 def updatepath(self, path, trafo, context):
     dx1 = context.t1stack.pop(0)
     dx2 = context.t1stack.pop(0)
     dy2 = context.t1stack.pop(0)
     dy3 = context.t1stack.pop(0)
     path.append(curveto_pt(*(trafo.apply_pt(context.x + dx1,       context.y) +
                              trafo.apply_pt(context.x + dx1 + dx2, context.y + dy2) +
                              trafo.apply_pt(context.x + dx1 + dx2, context.y + dy2 + dy3))))
     context.x += dx1+dx2
     context.y += dy2+dy3
示例#4
0
 def updatepath(self, path, trafo, context):
     dx1 = context.t1stack.pop(0)
     dx2 = context.t1stack.pop(0)
     dy2 = context.t1stack.pop(0)
     dy3 = context.t1stack.pop(0)
     path.append(curveto_pt(*(trafo.apply_pt(context.x + dx1,       context.y) +
                              trafo.apply_pt(context.x + dx1 + dx2, context.y + dy2) +
                              trafo.apply_pt(context.x + dx1 + dx2, context.y + dy2 + dy3))))
     context.x += dx1+dx2
     context.y += dy2+dy3
示例#5
0
文件: t1file.py 项目: mjg/PyX-svn
 def updatepath(self, path, trafo, context):
     sbx = context.t1stack.pop(0)
     wx = context.t1stack.pop(0)
     path.append(moveto_pt(*trafo.apply_pt(sbx, 0)))
     context.x = sbx
     context.y = 0
     context.wx = wx
     context.wy = 0
示例#6
0
 def updatepath(self, path, trafo, context):
     sbx = context.t1stack.pop(0)
     wx = context.t1stack.pop(0)
     path.append(moveto_pt(*trafo.apply_pt(sbx, 0)))
     context.x = sbx
     context.y = 0
     context.wx = wx
     context.wy = 0
示例#7
0
文件: t1file.py 项目: mjg/PyX-svn
 def updatepath(self, path, trafo, context):
     othersubrnumber = context.t1stack.pop()
     n = context.t1stack.pop()
     for i in range(n):
         context.psstack.append(context.t1stack.pop(0))
     if othersubrnumber == 0:
         flex_size, x, y = context.psstack[-3:]
         if context.flex:
             x1, y1, x2, y2, x3, y3 = context.psstack[2:8]
             x1, y1 = trafo.apply_pt(x1, y1)
             x2, y2 = trafo.apply_pt(x2, y2)
             x3, y3 = trafo.apply_pt(x3, y3)
             path.append(curveto_pt(x1, y1, x2, y2, x3, y3))
             x1, y1, x2, y2, x3, y3 = context.psstack[8:14]
             x1, y1 = trafo.apply_pt(x1, y1)
             x2, y2 = trafo.apply_pt(x2, y2)
             x3, y3 = trafo.apply_pt(x3, y3)
             path.append(curveto_pt(x1, y1, x2, y2, x3, y3))
         else:
             path.append(lineto_pt(*trafo.apply_pt(x, y)))
         context.psstack = [y, x]
     elif othersubrnumber == 1:
         pass
     elif othersubrnumber == 2:
         path.pathitems.pop()
         context.psstack.append(context.x)
         context.psstack.append(context.y)
示例#8
0
 def updatepath(self, path, trafo, context):
     othersubrnumber = context.t1stack.pop()
     n = context.t1stack.pop()
     for i in range(n):
         context.psstack.append(context.t1stack.pop(0))
     if othersubrnumber == 0:
         flex_size, x, y = context.psstack[-3:]
         if context.flex:
             x1, y1, x2, y2, x3, y3 = context.psstack[2:8]
             x1, y1 = trafo.apply_pt(x1, y1)
             x2, y2 = trafo.apply_pt(x2, y2)
             x3, y3 = trafo.apply_pt(x3, y3)
             path.append(curveto_pt(x1, y1, x2, y2, x3, y3))
             x1, y1, x2, y2, x3, y3 = context.psstack[8:14]
             x1, y1 = trafo.apply_pt(x1, y1)
             x2, y2 = trafo.apply_pt(x2, y2)
             x3, y3 = trafo.apply_pt(x3, y3)
             path.append(curveto_pt(x1, y1, x2, y2, x3, y3))
         else:
             path.append(lineto_pt(*trafo.apply_pt(x, y)))
         context.psstack = [y, x]
     elif othersubrnumber == 1:
         pass
     elif othersubrnumber == 2:
         path.pathitems.pop()
         context.psstack.append(context.x)
         context.psstack.append(context.y)
示例#9
0
文件: t1file.py 项目: mjg/PyX-svn
 def updatepath(self, path, trafo, context):
     dy = context.t1stack.pop(0)
     path.append(moveto_pt(*trafo.apply_pt(context.x, context.y + dy)))
     context.y += dy
示例#10
0
文件: t1file.py 项目: mjg/PyX-svn
 def updatepath(self, path, trafo, context):
     dx = context.t1stack.pop(0)
     dy = context.t1stack.pop(0)
     path.append(lineto_pt(*trafo.apply_pt(context.x + dx, context.y + dy)))
     context.x += dx
     context.y += dy
示例#11
0
文件: t1file.py 项目: mjg/PyX-svn
 def updatepath(self, path, trafo, context):
     path.append(closepath())
     # The closepath in T1 is different from PostScripts in that it does
     # *not* modify the current position; hence we need to add an additional
     # moveto here ...
     path.append(moveto_pt(*trafo.apply_pt(context.x, context.y)))
示例#12
0
 def updatepath(self, path, trafo, context):
     dy = context.t1stack.pop(0)
     path.append(moveto_pt(*trafo.apply_pt(context.x, context.y + dy)))
     context.y += dy
示例#13
0
 def updatepath(self, path, trafo, context):
     dx = context.t1stack.pop(0)
     dy = context.t1stack.pop(0)
     path.append(lineto_pt(*trafo.apply_pt(context.x + dx, context.y + dy)))
     context.x += dx
     context.y += dy
示例#14
0
 def updatepath(self, path, trafo, context):
     path.append(closepath())
     # The closepath in T1 is different from PostScripts in that it does
     # *not* modify the current position; hence we need to add an additional
     # moveto here ...
     path.append(moveto_pt(*trafo.apply_pt(context.x, context.y)))
示例#15
0
 def updatepath(self, path, trafo, context):
     x = context.t1stack.pop(0)
     y = context.t1stack.pop(0)
     path.append(moveto_pt(*trafo.apply_pt(x, y)))
     context.x = x
     context.y = y