Пример #1
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
Пример #2
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
Пример #3
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
Пример #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
 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
Пример #6
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
Пример #7
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
Пример #8
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
Пример #9
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
Пример #10
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)))
Пример #11
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
Пример #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)))