@@ -411,19 +411,22 @@ def _draw_markers(self, gc, path, rgbFace, x, y, transform):
411
411
"""
412
412
if debugPS : self ._pswriter .write ('% draw_markers \n ' )
413
413
414
- return
414
+ ## return
415
415
if rgbFace :
416
416
if rgbFace [0 ]== rgbFace [0 ] and rgbFace [0 ]== rgbFace [2 ]:
417
417
ps_color = '%1.3f setgray' % rgbFace [0 ]
418
418
else :
419
419
ps_color = '%1.3f %1.3f %1.3f setrgbcolor' % rgbFace
420
-
421
- #if transform.need_nonlinear():
422
- # x,y,mask = transform.nonlinear_only_numerix(x, y, returnMask=1)
423
- #else:
424
- # mask = ones(x.shape)
425
-
420
+
421
+ print x ,y
422
+ if transform .need_nonlinear ():
423
+ x ,y ,mask = transform .nonlinear_only_numerix (x , y , returnMask = 1 )
424
+ print x ,y
425
+ else :
426
+ mask = ones (x .shape )
427
+
426
428
x , y = transform .numerix_x_y (x , y )
429
+ print x , y
427
430
428
431
# the a,b,c,d,tx,ty affine which transforms x and y
429
432
#vec6 = transform.as_vec6_val()
@@ -469,15 +472,16 @@ def _draw_markers(self, gc, path, rgbFace, x, y, transform):
469
472
ps_cmd .append ('grestore' ) # undo translate()
470
473
ps_cmd = '\n ' .join (ps_cmd )
471
474
472
- # self._pswriter.write(' '.join(['/marker {', ps_cmd, '} bind def\n']))
475
+ self ._pswriter .write (' ' .join (['/marker {' , ps_cmd , '} bind def\n ' ]))
473
476
#self._pswriter.write('[%s]' % ';'.join([float(val) for val in vec6]))
474
477
# Now evaluate the marker command at each marker location:
475
478
start = 0
476
479
end = 1000
477
480
while start < len (x ):
478
481
479
- to_draw = izip (x [start :end ],y [start :end ])
480
- ps = ['%1.3f %1.3f marker' % point for point in to_draw ]
482
+ to_draw = izip (x [start :end ],y [start :end ],mask [start :end ])
483
+ ps = ['%1.3f %1.3f marker' % (xp , yp ) for xp , yp , m in to_draw if m ]
484
+ print ps
481
485
self ._draw_ps ("\n " .join (ps ), gc , None )
482
486
start = end
483
487
end += 1000
0 commit comments