--- /home/sjplimp/oldpizza/src/svg.py 2005-09-07 10:13:09.000000000 -0600 +++ /home/sjplimp/pizza/src/svg.py 2005-09-08 10:51:11.000000000 -0600 @@ -19,7 +19,7 @@ s.size(N) set image size to NxN s.size(N,M) set image size to NxM s.rotate(60,135) view from angle: z theta and azmth phi (def = 0,0) -s.trans(x,y,z) view from xyz translation (def = 0,0,0) +s.trans(x,y) translate by x,y in view window (def = 0,0) s.zoom(0.5) scale image by factor (def = 1) s.box(0/1/2) 0/1/2 = none/variable/fixed box s.file = "image" file prefix for created images (def = "image") @@ -83,7 +83,6 @@ # would not let you grow # of atoms selected # box draw overlays all atoms, needs to be z-clipped # might have to draw as segments and include segments in z-sort -# trans() fn is not working yet # labels are not using colors from color table # need to allow color and radius for box lines @@ -217,7 +216,7 @@ # loop over all selected steps # distance from 1st snapshot box or max box for all selected steps - # pre-call single() to re-center simulation data on 1st step or if panning + # call single() w/ scaling on 1st step or if panning if len(list) <= 1: @@ -261,7 +260,7 @@ # loop ncount times on same step # distance from 1st snapshot box or max box for all selected steps - # pre-call single() to re-center simulation data on 1st step or if panning + # call single() w/ scaling on 1st step or if panning else: @@ -324,8 +323,12 @@ xctr = 0.5 * (box[0]+box[3]) yctr = 0.5 * (box[1]+box[4]) zctr = 0.5 * (box[2]+box[5]) - self.offsetx = matrix[0]*xctr + matrix[3]*yctr + matrix[6]*zctr - self.offsety = matrix[1]*xctr + matrix[4]*yctr + matrix[7]*zctr + if self.ztheta or self.azphi: + self.offsetx = matrix[0]*xctr + matrix[3]*yctr + matrix[6]*zctr + self.offsety = matrix[1]*xctr + matrix[4]*yctr + matrix[7]*zctr + else: + self.offsetx = xctr + self.offsety = yctr olist = [] @@ -461,9 +464,9 @@ factor = self.factor offsetx = self.offsetx offsety = self.offsety - xctr = 0.5 * self.max_x - yctr = 0.5 * self.max_y - + xctr = 0.5 * self.max_x + factor*self.xshift + yctr = 0.5 * self.max_y - factor*self.yshift + for obj in objlist: if obj[0] == 0: obj[2] = factor*(obj[2] - offsetx) + xctr --- /home/sjplimp/oldpizza/doc/svg.txt 2005-09-07 10:13:10.000000000 -0600 +++ /home/sjplimp/pizza/doc/svg.txt 2005-09-08 10:49:20.000000000 -0600 @@ -71,7 +71,7 @@ s.size(N) set image size to NxN s.size(N,M) set image size to NxM s.rotate(60,135) view from angle: z theta and azmth phi (def = 0,0) -s.trans(x,y,z) view from xyz translation (def = 0,0,0) +s.trans(x,y) translate by x,y in view window (def = 0,0) s.zoom(0.5) scale image by factor (def = 1) s.box(0/1/2) 0/1/2 = none/variable/fixed box s.file = "image" file prefix for created images (def = "image") :pre --- /home/sjplimp/oldpizza/doc/svg.html 2005-09-07 10:13:10.000000000 -0600 +++ /home/sjplimp/pizza/doc/svg.html 2005-09-08 10:49:30.000000000 -0600 @@ -74,7 +74,7 @@ s.size(N) set image size to NxN s.size(N,M) set image size to NxM s.rotate(60,135) view from angle: z theta and azmth phi (def = 0,0) -s.trans(x,y,z) view from xyz translation (def = 0,0,0) +s.trans(x,y) translate by x,y in view window (def = 0,0) s.zoom(0.5) scale image by factor (def = 1) s.box(0/1/2) 0/1/2 = none/variable/fixed box s.file = "image" file prefix for created images (def = "image")