@@ -582,18 +582,29 @@ def draw_markers(self, gc, marker_path, marker_trans, path, trans, rgbFace=None)
582
582
583
583
# construct the generic marker command:
584
584
ps_cmd = ['/o {' , 'gsave' , 'newpath' , 'translate' ] # dont want the translate to be global
585
- jint = gc .get_joinstyle ()
586
- ps_cmd .append ('%d setlinejoin' % jint )
587
- cint = gc .get_capstyle ()
588
- ps_cmd .append ('%d setlinecap' % cint )
585
+
586
+ lw = gc .get_linewidth ()
587
+ stroke = lw != 0.0
588
+ if stroke :
589
+ ps_cmd .append ('%.1f setlinewidth' % lw )
590
+ jint = gc .get_joinstyle ()
591
+ ps_cmd .append ('%d setlinejoin' % jint )
592
+ cint = gc .get_capstyle ()
593
+ ps_cmd .append ('%d setlinecap' % cint )
589
594
590
595
ps_cmd .append (self ._convert_path (marker_path , marker_trans ,
591
596
simplify = False ))
592
597
593
598
if rgbFace :
594
- ps_cmd .extend (['gsave' , ps_color , 'fill' , 'grestore' ])
599
+ if stroke :
600
+ ps_cmd .append ('gsave' )
601
+ ps_cmd .extend ([ps_color , 'fill' ])
602
+ if stroke :
603
+ ps_cmd .append ('grestore' )
595
604
596
- ps_cmd .extend (['stroke' , 'grestore' , '} bind def' ])
605
+ if stroke :
606
+ ps_cmd .append ('stroke' )
607
+ ps_cmd .extend (['grestore' , '} bind def' ])
597
608
598
609
for vertices , code in path .iter_segments (trans , simplify = False ):
599
610
if len (vertices ):
0 commit comments